我希望在CakePHP 3中名为Posts的一个表中获得不同条件下的多个总计
这可能吗
计算post_sent,其中post_sent = 0
计算post_sent,其中post_sent = 1
计算rsvp,其中rsvp = 3
SELECT count(Case when post_sent=0 then 1 else 0 end) as post_not_sent,
count(Case when post_sent=1 then 1 else 0 end) as post_sent,
count(Case when rsvp=3 then 1 else 0 end) as rsvp_sent
FROM content_form