|
)Amerikada yashovchi eng faol hodimlar haqida ma`lumot shakllantiring
|
bet | 2/3 | Sana | 31.12.2021 | Hajmi | 18,55 Kb. | | #218327 |
| Bog'liq Databasa
6)Amerikada yashovchi eng faol hodimlar haqida ma`lumot shakllantiring
select * from customers
where customer_id=(select orders.customer_id from customers
join orders
on customers.customer_id=orders.customer_id
where customers.country='USA'
group by orders.customer_id
order by count(*) desc
limit 1)
7)Qaysi davlatdagi hodimlar eng faol ishlashi haqidagi hisobot shakllantiring
select country from customers
where customer_id=(select orders.customer_id from customers
join orders
on customers.customer_id=orders.customer_id
group by orders.customer_id
order by count(*) desc
limit 1)
8)1997-yilda eng ko`p summada buyurtma qilgan haridorlar haqida m`lumot.
select * from customers
where customer_id=(select od.customer_id from public.orders as od
join public.order_details as ordd
on od.order_id=ordd.order_id
where to_char(order_date,'YYYY')='1997'
group by od.customer_id
order by sum(unit_price) desc
limit 1
)
Do'stlaringiz bilan baham: |
|
|