9)Eng kam buyurtma qilingan mahsulotlar
select pro.product_name,count(*) from public.products as pro
join public.order_details as ord
on pro.product_id=ord.product_id
join public.orders as od
on ord.order_id = od.order_id
group by product_name
order by count
limit 10;
10)1-kategoriyadagi eng qimmat sotilgan 10ta mahsulot kim tomonidan zakaz qilinganligi va qaysi
kompaniya tomonidan yetkazib berilganligi haqida ma`lumot
select cat.category_name,sup.company_name,ord.unit_price from public.categories as cat
join public.products as pro
on cat.category_id=pro.category_id
join public.order_details as ord
on pro.product_id = ord.product_id
join public.suppliers as sup
on pro.supplier_id = sup.supplier_id
where cat.category_id='1'
group by cat.category_name,sup.company_name,ord.unit_price
order by ord.unit_price desc
11)Ko`p zakaz qilingan ammo narxi arzon mahsulotlar ro`yxatini shakllantiring
12)Londonda yashovchi va zakazlar soni kam bo`lgan kompaniyalar soni chiqarilsin
13)Har bir kategoriya bo`yicha eng qimmat maxsulotni chop etuvchi so`rov yozing (products va
categories)
14)Eng ko`p buyurtma qilgan 10ta haridorni chop etuvchi so`rov yozing (Customers va Orders)
15)Eng kam sotilgan 10ta maxsulotni topuvchi so`rov yozing (Products va Order Details)
16)1996-yilda buyurtma qilingan maxsulotlarning umumiy summasini topuvchi so`rov yozing
(Orders va Order Details)
17)Eng ko`p summadagi buyurtma qilgan 5ta haridorni topuvchi so`rov yozing (Customers, Orders
va Order Details)
18)Buyurtmalar soni 50tadan kam bo`lgan ishchilar haqida ma`lumotni topuvchi so`rov yozing
(Employees va Orders)
19)Har bir yil bo`yicha buyurtmalar sonini chop eting (Oraliq nazoratdan)
20)1997-yil may oyida eng ko`p buyurtma qabul qilingan beshta kunni chop eting (Oraliq
nazoratdan)
21)1996-yili qaysi oyida eng ko’p mahsulot zakaz qilinganligini aniqlab beruvchi so’rov
shakllantiring
22)Eng ko’p buyurtma qabul qilingan 10ta kunni chop etish
>>Vaqtida yetkazib berilgan mahsulotlarni qancha muddatda yetkazilganligi va kim tomonidan
yetkazilganligi haqida ma’lumotni shakllantiring
select required_date,shipped_date,ship_via,ship_name,required_date-shipped_date
from public.orders
where required_date>=shipped_date
23)Ikki va undan ortiq buyurtma bergan haridorlar soni top 50tasini chiqarish
24)Har bir davlatdan nechta hodim borligini aniqlash so`rovini tuzish
25)5 tadan ko’p buyurtmani o’z vaqtida yetkazib bermagan hodimlar ro’yxatini chop eting
26)10 tadan ko’p sotilgan mahsulotlar va hodimlar haqida ma’lumot
27)20 tadan ortiq mijozga (customer) ega bo’lgan davlatlar ro’yxatini chiqarib beruvchi so’rov
shakllantiring
28)Eng ko’p zakazni amalga oshirgan hodimlar haqida ma’lumot shakllantiring
29)3 tadan ko’p buyurtmani o’z vaqtida yetkazib bermagan hodimlar ro’yhatini shakllantiring
30)Amerikada yashovchi eng faol xodimlar haqida ma'lumot shakllantiring
Dostları ilə paylaş: |