প্রতিটি প্রোডাক্টকে স্টক অনুযায়ী bucket-এ ভাগ করো: স্টক ০ হলে out_of_stock, ১০-এর কম হলে low_stock, নাহলে healthy। প্রতিটি bucket-এ কতটি প্রোডাক্ট আছে বের করো; bucket নাম অনুযায়ী সাজাও।
কোনো ইনপুট নেই — একটি SQL query লেখো।
প্রতি লাইনে status, product_count।
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)
healthy 7 low_stock 7
update products set stock=0 where id in (4,5);
healthy 6 low_stock 6 out_of_stock 2