We're updating the issue view to help you get more done.Learn more

Preside objects data select: just get a record count

This is actually more involved than just replacing the selectFields with "count(1) as record_count". Once you have HAVING filters, etc ( PRESIDECMS-646 ). you will need a subquery, so:

1 2 3 4 5 6 7 8 select count(1) as record_count from ( select website_user.id from `psys_website_user` `website_user` left join `psys_website_benefit__join__website_user` `benefits` on (`benefits`.`website_user` = `website_user`.`id`) group by website_user.id having Count( `benefits`.`website_user` ) = 0 ) subquery;

Status

Assignee

Unassigned

Reporter

Dominic Watson

Accepted

Yes

Fix versions

Priority

Medium