Asosiy matnga o'tish

28. Uzum: buyurtma → mahsulot → sotuvchi

Oson

Uzum da uch jadval bor: orders, products, sellers.

Har bir buyurtma uchun mahsulot nomi va sotuvchi do'koni nomini qaytaring:

order_id, product, seller.

Saralash: order_id o'sish.

orders: id INT PK, product_id INT, quantity INT

products: id INT PK, name VARCHAR, seller_id INT

sellers: id INT PK, shop_name VARCHAR

Jadval: sellers

UstunTuri
idINT PK
shop_nameVARCHAR(80)

Jadval: products

UstunTuri
idINT PK
nameVARCHAR(100)
seller_idINT

Jadval: orders

UstunTuri
idINT PK
product_idINT
quantityINT

Namuna ma'lumotlar

sample-basic
sellers
idINTshop_nameVARCHAR(80)
1TechStore
2HomeMarket
products
idINTnameVARCHAR(100)seller_idINT
1Quloqchin1
2Choynak2
3Sichqoncha1
orders
idINTproduct_idINTquantityINT
112
231
325
Kutilgan natija
sellerproductorder_id
TechStoreQuloqchin1
TechStoreSichqoncha2
HomeMarketChoynak3
sample-single
sellers
idINTshop_nameVARCHAR(80)
1BookWorld
products
idINTnameVARCHAR(100)seller_idINT
1Kitob1
orders
idINTproduct_idINTquantityINT
113
Kutilgan natija
sellerproductorder_id
BookWorldKitob1
sample-chain
sellers
idINTshop_nameVARCHAR(80)
1ToyLand
products
idINTnameVARCHAR(100)seller_idINT
1Qo‘g‘irchoq1
2To‘p1
orders
idINTproduct_idINTquantityINT
121
214
Kutilgan natija
sellerproductorder_id
ToyLandTo‘p1
ToyLandQo‘g‘irchoq2

O'xshash masalalar

Konsol

Natijani ko'rish uchun so'rovni ishga tushiring.