গ্রোথ টিম প্রতিটি কাস্টমারের কার্যকর-অর্ডারের (paid/shipped) হিসাব চায় — কিন্তু যে কাস্টমার এখনো একটাও কার্যকর অর্ডার দেয়নি, সেও তালিকায় থাকবে, গুনতি শূন্য। প্রতি কাস্টমারের customer, city, কার্যকর অর্ডারের সংখ্যা order_count আর সর্বশেষ অর্ডারের তারিখ last_order (না থাকলে none) বের করো; বেশি অর্ডার আগে, সমান হলে নাম অনুযায়ী।
কোনো ইনপুট নেই — একটি SQL query লেখো।
প্রতি লাইনে customer, city, order_count, last_order — সংখ্যা নিচের ক্রমে, সমান হলে customer অনুযায়ী; last_order না থাকলে none।
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)
Rahim Dhaka 3 2026-10-20 Nusrat Dhaka 2 2026-10-28 Karim Chattogram 1 2026-10-25 Mim Khulna 1 2026-10-22 Tanvir Dhaka 1 2026-11-02 Sajid Sylhet 0 none
insert into orders (id,customer_id,ordered_at,status) values (11,4,'2026-11-06','paid'); insert into order_items (id,order_id,product_id,quantity,unit_price_cents) values (16,11,13,1,210000);
Rahim Dhaka 3 2026-10-20 Nusrat Dhaka 2 2026-10-28 Karim Chattogram 1 2026-10-25 Mim Khulna 1 2026-10-22 Sajid Sylhet 1 2026-11-06 Tanvir Dhaka 1 2026-11-02