prova ad aggiungere il campo data nella select

SELECT data,...,...,... from XXX ORDER BY data