semana 6.PNG

select * from Products p
inner join Categories c on (c.CategoryID = p.CategoryID) 

select *
from Products
where UnitPrice > (select AVG(UnitPrice) from Products)

select *
from Products
where UnitPrice <> (select AVG(UnitPrice) from Products)
-- <> sinifica diferente

select * from Products p
inner join Categories c on (c.CategoryID = p.CategoryID)
where c.CategoryName = 'Condiments'

select * from Products p
where exists (select * from Categories c
where c.CategoryName = 'Condiments'
and c.CategoryID = p.CategoryID)