প্রতিটি প্রোডাক্টের দাম তার ক্যাটাগরির গড় দামের চেয়ে বেশি হলে সেই প্রোডাক্টের নাম, ক্যাটাগরি আর দাম (সেন্টে) বের করো; ক্যাটাগরি, তারপর দাম descending, তারপর নাম অনুযায়ী সাজাও।
কোনো ইনপুট নেই — একটি SQL query লেখো।
প্রতি লাইনে name, category, price_cents।
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)
Clean Code Books 180000 27in Monitor Electronics 1850000 Clay Dinner Set Home 320000 Denim Jacket Men 380000
update products set price_cents=price_cents*2 where id in (5,8);
SQL Handbook Books 190000 27in Monitor Electronics 1850000 Clay Dinner Set Home 320000 Denim Jacket Men 380000