Select T.name,T.done,T.note,datetime(T.done_date,'unixepoch'),L.name From tasks AS T INNER JOIN lists AS L ON T.list_id = L.id order by L.name