There is a database which contains below tables.
Product
Customer
P.Name,
count(C.CID)
From
@Product P
left join @Customer C on C.PID = P.PID
Group by
P.Name
2. Write a query which shows the Product which doesn't have any customer.
Select
Name
From
@Product
Where
PID not in (select distinct PID from @Customer where PID is not null)