You are on page 1of 1

select CustomerID,ContactName,Country

from Customers
where not ( Country ='brazil' or Country='argentina')

select productid,productname,unitprice
from Products
where UnitPrice>=20 and UnitPrice<=30
order by UnitPrice desc

select productid,productname,unitprice
from Products
where UnitPrice between 20 and 30
select CustomerID,ContactName,Country
from Customers
where Country in ('spain','brasil','argentina','france')

select CustomerID,ContactName,country
from Customers
where ContactName like 'Ana%'
select CustomerID,ContactName,country
from Customers
where ContactName like '%na%'
select CustomerID,ContactName,country
from Customers
where ContactName like '[f-m]%'

select country,COUNT(country)from Customers


group by country
order by COUNT(country) desc

select country,COUNT(country)from Customers


group by country
having country like 'a%'
order by COUNT(country) desc

select C.categoryname as categoria, P.Productname as producto,


p.unitprice,P.unitsInstock as cantidad,
p.unitprice*P.unitsInstock as total
from Categories as c inner join Products as p
on C.categoryID= p.categoryID
order by total desc

You might also like