I have 2 tables, in feeds I have my feeds and (feeds.ID) is the primary key. second table is items. and feeds.ID is realted to items.feed_ID, so with a simple inner join i can extract the data of each feed. but now i have deleted some of the feeds but i didnt delete them in items table. i want to find the items which have no resource on feeds table. on the other hand i want to find the useless items. what is the query? i have tried this: but it shows error
select * from items where feed_id NOT IN
(select id from feeds
inner join items on feeds.id=items.feed_id group by feed_id) group by feed_id
