গাইডেড প্রবলেমে ক্যাটাগরির গড় দিয়েছিলাম — এবার ভেন্ডর। products থেকে যেসব প্রোডাক্টের দাম তাদের নিজের ভেন্ডরের সব প্রোডাক্টের গড় দামের চেয়ে বেশি, তাদের name, vendor (ভেন্ডরের নাম), price_cents আর সেই ভেন্ডরের গড় vendor_avg_cents (পূর্ণসংখ্যায় round করা) বের করো; দাম নিচের ক্রমে, সমান হলে নাম অনুযায়ী।
কোনো ইনপুট নেই — একটি SQL query লেখো।
প্রতি লাইনে name, vendor, price_cents, vendor_avg_cents — দাম নিচের ক্রমে, টাই-এ name।
Write your solution, test it against custom input, then submit for a real verdict.
Your submissions, verdicts, drafts and contest score are tied to your account. Registration is free.
ShopSphere fixture. Standard SQL (SQLite-compatible engine).
SQL samples run against the ShopSphere fixture. When a sample shows dataset setup, the judge applies it before running your query; the expected rows are TSV.
Base ShopSphere fixture (no changes)
27in Monitor TechNest 1850000 717500 Denim Jacket StyleHub 380000 246667 Clay Dinner Set HomeCraft 320000 215000 Dune BookBazar 210000 161667 Clean Code BookBazar 180000 161667 Laptop Stand GadgetPoint 150000 117500
update products set price_cents=80000 where id=9;
27in Monitor TechNest 1850000 717500 Denim Jacket StyleHub 380000 246667 Clay Dinner Set HomeCraft 320000 215000 Dune BookBazar 210000 161667 Clean Code BookBazar 180000 161667 Wireless Mouse GadgetPoint 85000 82500