I have two tables for Groups and Category i wanted to return the groups and categories excluding those groups which doesn't have any category here is the SQL i wrote:
SELECT 
    cat_group.subject as group_name , spcat . *
FROM
    special_event_groups AS cat_group
        LEFT JOIN
    special_event_categories AS spcat ON cat_group.id = spcat.group_id
        AND cat_group.partner_id = spcat.partner_id;
Its returning me the records of group with NULL values which doesn't have any category. Do i need to use a subquery ?
 
     
     
    