Return to Snippet

Revision: 37700
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

Initial Description

Initial Title
Select Count of Distinct Value

Initial Tags

Initial Language