Advertisement
theitd

Civi New, Current, Grace COUNT

Apr 19th, 2018
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.63 KB | None | 0 0
  1. SELECT COUNT(*)
  2.  
  3. FROM civicrm_contact contact_civireport  
  4.          
  5.                INNER JOIN civicrm_membership membership_civireport
  6.                           ON contact_civireport.id =
  7.                              membership_civireport.contact_id AND membership_civireport.is_test = 0
  8.                LEFT  JOIN civicrm_membership_status mem_status_civireport
  9.                           ON mem_status_civireport.id =
  10.                              membership_civireport.status_id
  11.  
  12.  
  13. WHERE ( membership_civireport.membership_type_id IN (1) ) AND ( mem_status_civireport.id IN (1, 2, 3, 12) )  
  14.  
  15. ORDER BY membership_civireport.membership_type_id DESC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement