File indexing completed on 2024-04-14 05:53:07

0001 CREATE VIEW v_supporter_view_queue
0002 AS 
0003 SELECT 
0004  p.section_id
0005  ,s.member_id
0006  ,sum(round(p.tier * 3.03,0)) AS weight
0007 FROM section_support_paypements p
0008 JOIN support s ON s.id = p.support_id
0009 WHERE p.yearmonth = DATE_FORMAT(NOW(),'%Y%m')
0010 AND s.member_id NOT IN (543047,544922,375449,544922,544923,544924 )
0011 GROUP BY p.section_id,s.member_id
0012 ;