A query on two joined tables
Try this query:

select * from items where feed_id NOT IN (select id from feeds)


Also set foriegn key relationship with delete cascade. So it will get deleted from dependent tables as well.