Link to home
Start Free TrialLog in
Avatar of summerset
summerset

asked on

Select only if count results type > 0 in detail table

Hi,

I'm using sqlite. I have 2 tables. One is a detail table. I want to select all the records in table 1 only if they have details in table 2 where the column "type" equals "List"

select * from Vehicles

having

select count > 0 from list_detail where type = "List"

Any help would be greatly appreciated.

-S
ASKER CERTIFIED SOLUTION
Avatar of Terry Woods
Terry Woods
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of summerset
summerset

ASKER

Perfect. Thank you so much for your help and quick reply.