প্রাইসিং টিম প্রতিটি প্রোডাক্টের দামকে মার্কেটপ্লেসের সবচেয়ে দামি প্রোডাক্টের শতকরা হিসেবে দেখতে চায়। প্রতিটি প্রোডাক্টের name, price_cents আর pct_of_max (সর্বোচ্চ দামের তুলনায় শতাংশ, এক দশমিক ঘর) বের করো; শতাংশ বেশি থেকে কম, সমান হলে নাম অনুযায়ী।
কোনো ইনপুট নেই — একটি SQL query লেখো।
প্রতি লাইনে name, price_cents, pct_of_max — শতকরা নিচের ক্রমে, সমান হলে name অনুযায়ী।
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)
27in Monitor 1850000 100.0 Mechanical Keyboard 450000 24.3 Denim Jacket 380000 20.5 Webcam 350000 18.9 Clay Dinner Set 320000 17.3 Cotton Panjabi 240000 13.0 USB-C Hub 220000 11.9 Dune 210000 11.4 Clean Code 180000 9.7 Laptop Stand 150000 8.1 Leather Wallet 120000 6.5 Table Lamp 110000 5.9 SQL Handbook 95000 5.1 Wireless Mouse 85000 4.6
update products set price_cents=900000 where id=3;
27in Monitor 900000 100.0 Mechanical Keyboard 450000 50.0 Denim Jacket 380000 42.2 Webcam 350000 38.9 Clay Dinner Set 320000 35.6 Cotton Panjabi 240000 26.7 USB-C Hub 220000 24.4 Dune 210000 23.3 Clean Code 180000 20.0 Laptop Stand 150000 16.7 Leather Wallet 120000 13.3 Table Lamp 110000 12.2 SQL Handbook 95000 10.6 Wireless Mouse 85000 9.4