It:
WITH features AS ( SELECT feature FROM ( VALUES ('Car'), ('Moto') ) q (feature) ) SELECT * FROM table1 t1 WHERE NOT EXISTS ( SELECT feature FROM features EXCEPT SELECT feature FROM table2 t2 WHERE t2.id = t1.id )
or that:
SELECT * FROM table t1 WHERE ( SELECT COUNT(*) FROM table2 t2 WHERE t2.id = t1.id AND t2.feature IN ('Car', 'Moto') ) = 2
Which query is more efficient depends on the number of records in both tables and the number of matches.
source share