For simplification, I have two tables related with one to many using a foreign key, for example:
Users table: id name Actions table: id user_id
SELECT u.id FROM users u LEFT JOIN actions a ON a.user_id = u.id WHERE a.user_id IS NULL