Skip to content
asalant edited this page Sep 14, 2010 · 1 revision

Ad Hoc Reporting

This is just a set of notes of ad hoc reports you can run against the database. The most useful of these should become canned reports in the reporting UI.

Membership renewals for SFBK since 2010/01/01:

SELECT count(DISTINCT services.id) AS count_services_id FROM `services` LEFT OUTER JOIN `people` ON `people`.id = `services`.person_id WHERE (( ( people.organization_id = 435514393 ) AND ( services.service_type_id IN ('MEMBERSHIP') ) ) AND ( services.start_date > '2010-01-01' ) AND ( (select count(*) from services as s2 where s2.person_id = people.id) > 1));

Clone this wiki locally