I need statistics about alert tagged by codes. Alerts are visible for users with group based restrictions. In case when some tag code is only in alerts which are invisible for user then 0 should be displayed in statisitics. Tables structure: I’m using Blaze-Persistence and try to make GROUP BY in LEFT JOIN SUBQUERY with COALESCE in root query. Reason