title: Get Record only if its Join record exists in other table
body: <p>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: </p>
  
  <pre><code>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;
  </code></pre>
  
  <p>Its returning me the records of group with NULL values which doesn't have any category. Do i need to use a subquery ?</p>