ব্যবসা-টিম প্রতি ভেন্ডরের রিচ মাপছে: তাদের প্রোডাক্ট অন্তত একটা অর্ডারে কেনা হয়েছে এমন কতজন আলাদা কাস্টমার আছে (অর্ডারের স্ট্যাটাস যাই হোক — বাতিলও গোনা হবে)। প্রতি ভেন্ডরের vendor (নাম) ও buyers বের করো — কেউ কিনেনি এমন ভেন্ডরও তালিকায় থাকবে ০ সংখ্যায়; বেশি buyers আগে, সমান হলে নাম অনুযায়ী।
কোনো ইনপুট নেই — একটি SQL query লেখো।
প্রতি লাইনে vendor, buyers — সংখ্যা নিচের ক্রমে, টাই-এ vendor; ক্রেতা না থাকলে ০।
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)
BookBazar 2 GadgetPoint 2 HomeCraft 2 StyleHub 2 TechNest 2 PaperTrail 0
update orders set customer_id=4 where id=7;
BookBazar 2 GadgetPoint 2 HomeCraft 2 StyleHub 2 TechNest 2 PaperTrail 0