ক্যাটাগরি ম্যানেজাররা জানতে চায় তাদের তাদের ক্যাটাগরি কত টাকার বিক্রি করেছে। শুধু কার্যকর অর্ডার (paid বা shipped) ধরে প্রতি ক্যাটাগরির মোট বিক্রির টাকা (সেন্টে) বের করো — category ও revenue_cents; বেশি রেভিনিউ আগে, সমান হলে ক্যাটাগরির নাম অনুযায়ী।
কোনো ইনপুট নেই — একটি SQL query লেখো।
প্রতি লাইনে category, revenue_cents — রেভিনিউ নিচের ক্রমে, সমান হলে category অনুযায়ী।
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)
Electronics 3340000 Men 860000 Home 540000 Books 465000 Fashion 240000
update orders set status='cancelled' where id=3;
Electronics 3340000 Home 540000 Books 465000 Men 380000 Fashion 120000