[sql] How to exclude rows that don't join with another table?