Sqlite Order By In Subquery