You are on page 1of 2

1)

SELECT customerName, country, creditLimit


FROM customers
WHERE country='France'
ORER !" creditLimit#
$)
SELECT %FROM em&'oyers N(T)R(L *O+N o,,ices
WHERE o,,ices 'city'----
.......................................
SELECT o,,iceCode, city
FROM o,,ices
o,,ices N(T)R(L *O+N em&'oyees
WHERE city='San Francisco'
/)
se'ect em&'oyerNum0er ,rom em&'yeres 12ere ,irstName='3ame'a'
and 'astName='Casti''o'
4)se'ect %,rom customers 12ere isnu''5--------)
order 0y -------
6)
&roductCode, &roductname,-------------
se'ect %,rom oredersditai's
natura' 7oin &roducts
12ere orderNum0er=1819/
:)
seLect customerName, customerNum0er, sum5&rice3ac2%;ua'ityOrders as a resu't)%,rom orders
N(T)R(L *O+N orderditai's
natura' 7oin customers
12ere orders-'satus'<='C(NCELLE'
9)
se'ecr customerNum0er, customerName, sum5----)
,rom orders
natura' 7oin orderdetai's
12ere ordrs------
=)
>)
se'ect customers-% ,orm customers 'e,t 7oin orders
on customers-?customerNum0er?=orders-?customersNum0ers?
12ere isnu''-5orders?orderNum0er?)
@rou& 0y customers-customerNum0er
18)
se'ect o,,icecode-o,,iceCode, o,,ice-?city?, round5sum5;uantityordened%&riceRac2)) as tota'
,rom orders natura' 7oin orderdetai's
natura' 7on customers
inner 7oin em&'oyers
on customers-?sa'esem&'oyersNum0er?=em&'oyers-?em&'oyerNum0er?
12ere order-?satus?<=?C(NCELE?
@rou& 0y o,,iceCode-o,,icecode

You might also like