গ্রোথ টিম খরচের ভিত্তিতে কাস্টমারদের টিয়ারে ভাগ করছে। প্রতি কাস্টমারের কার্যকর অর্ডারের (paid/shipped) মোট খরচ বের করো spent_cents নামে (quantity × unit price, সেন্টে) — কার্যকর অর্ডার না-থাকা কাস্টমারও তালিকায় থাকবে, খরচ ০। সাথে tier: কার্যকর অর্ডারই নেই হলে none, খরচ ১০ লাখ সেন্ট (1000000) বা বেশি হলে vip, ৩ লাখ সেন্ট (300000) বা বেশি হলে regular, নাহলে small। কলাম: customer, city, spent_cents, tier; খরচ নিচের ক্রমে, সমান হলে নাম অনুযায়ী।
কোনো ইনপুট নেই — একটি SQL query লেখো।
প্রতি লাইনে customer, city, spent_cents, tier — খরচ নিচের ক্রমে, টাই-এ ।
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.
customerShopSphere 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)
Rahim Dhaka 3495000 vip Nusrat Dhaka 720000 regular Mim Khulna 670000 regular Tanvir Dhaka 380000 regular Karim Chattogram 180000 small Sajid Sylhet 0 none
update orders set status='paid' where id=5;
Rahim Dhaka 3495000 vip Nusrat Dhaka 720000 regular Mim Khulna 670000 regular Tanvir Dhaka 380000 regular Karim Chattogram 180000 small Sajid Sylhet 170000 small