il primo order by va bene anche nel secondo caso. E' sufficiente che data1 sia null