postgres select from table cancel code example
Example: postegresql delete
DELETE FROM films
WHERE producer_id IN (SELECT id FROM producers WHERE name = 'foo');
DELETE FROM films
WHERE producer_id IN (SELECT id FROM producers WHERE name = 'foo');