theitd icon

Civi New, Current, Grace COUNT

theitd | PRO | 04/19/18 02:40:04 PM UTC | 0 ⭐ | 527 👁️ | Never ⏰ | []
MySQL |

630 B

|

None

|

0 👍

/

0 👎

SELECT COUNT(*)
 
FROM civicrm_contact contact_civireport   
         
               INNER JOIN civicrm_membership membership_civireport
                          ON contact_civireport.id =
                             membership_civireport.contact_id AND membership_civireport.is_test = 0
               LEFT  JOIN civicrm_membership_status mem_status_civireport
                          ON mem_status_civireport.id =
                             membership_civireport.status_id 
 
 
WHERE ( membership_civireport.membership_type_id IN (1) ) AND ( mem_status_civireport.id IN (1, 2, 3, 12) )  
 
ORDER BY membership_civireport.membership_type_id DESC

Comments