SELECT "c".* FROM cats c INNER JOIN dogs d on d.cat_id = cats.id;