Revision: 37700
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at December 15, 2010 11:39 by Tate
Initial Code
SELECT ChurchID, ChurchName, COUNT( * ) as count FROM ( SELECT churchxref.ChurchID, church.ChurchName FROM tripapplication LEFT JOIN tripleg ON tripapplication.triplegid = tripleg.triplegid LEFT JOIN person ON person.PersonID = tripapplication.personid LEFT JOIN churchxref ON churchxref.system_user_id = person.PersonID LEFT JOIN church ON church.ChurchID = churchxref.ChurchID WHERE tripleg.tripid = 232 ) AS DerivedTableB GROUP BY ChurchID
Initial URL
http://answers.google.com/answers/threadview/id/235114.html
Initial Description
Initial Title
Select Count of Distinct Value
Initial Tags
Initial Language
SQL