I am trying to figure out how to get the members of my site who are paying members and have been doing so for over 12 months. I tried this: PHP: SELECT * FROM `amember_members` WHERE STATUS =1 AND added < '2009-04-17 00:00:00' AND DATA REGEXP 'is_active' LIMIT 0 , 30 But it's including free accounts. help?
This will return all users who signup year ago, still active, and have at least one non free payment in past year Code: select m.*, sum(p.amount) as paid from amember_members m left join amember_payments p using(member_id) where m.added < '2009-04-17 00:00:00' and m.status=1 and p.completed=1 having paid >0