[thelist] SQLite group by query

r937 rudy at r937.com
Fri Apr 29 09:37:27 CDT 2011


your query uses a LEFT OUTER JOIN but the query doesn't actually use any of 
the right table's columns, so i think you can just remove the join

SELECT *
  FROM messages
 WHERE siteId = @siteId
ORDER
    BY threadDate DESC
     , COALESCE(a.parentGUID,a.GUID)
     , datePosted

--
rudy
http://r937.com/ 




More information about the thelist mailing list