Jeffrey Mattox wrote: > Can (1) and (3) be combined to return grandTotalCount and > largestSubTotalCount?
In the general case, you can combine them in two columns: SELECT (SELECT ...) AS grandTotalCount, (SELECT ...) AS largestSubTotalCount; or in two rows: SELECT ... UNION ALL SELECT ...; But neither one is more efficient than just doing two queries. (If you don't have a helper function that executes a query and returns the single result, write one.) Regards, Clemens _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

