মার্কেটিং অক্টোবরের কুপন-পারফরম্যান্স রিপোর্ট চায়। শুধু যেসব কুপন অক্টোবরে (১ অক্টোবর থেকে ৩১ অক্টোবর সারাদিন — অর্থাৎ ১ নভেম্বরের আগে) অন্তত একবার redeem হয়েছে: তাদের code, kind, কতবার redeem হয়েছে (redemptions) আর মোট ডিসকাউন্ট (discount_cents) বের করো। মোট ডিসকাউন্ট নিচের ক্রমে, সমান হলে কোড অনুযায়ী।
কোনো ইনপুট নেই — একটি SQL query লেখো।
প্রতি লাইনে code, kind, redemptions, discount_cents — ডিসকাউন্ট নিচের ক্রমে, টাই-এ code।
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)
TECH15 percent 1 300000 FESTIVE500 fixed 2 100000 WELCOME10 percent 1 89000 FREESHIP fixed 1 6000
insert into coupon_redemptions (id,coupon_id,order_id,customer_id,discount_cents,redeemed_at) values (7,4,3,3,300000,'2026-10-15');
TECH15 percent 2 600000 FESTIVE500 fixed 2 100000 WELCOME10 percent 1 89000 FREESHIP fixed 1 6000