ফাইন্যান্স টিম প্রতি অর্ডারের দুই দিক মেলাচ্ছে: ক্যাটালগ মোট (সেই অর্ডারের order_items-এ quantity × unit price) আর পেমেন্টে চলে যাওয়া মোট (সেই অর্ডারের payments-এর সব সারির যোগফল — স্ট্যাটাস যাই হোক)। প্রতি অর্ডারের order_id, items_total_cents, payments_total_cents বের করো — কোনো দিক খালি হলে ০ দেখাবে; অর্ডার আইডি অনুযায়ী সাজাও।
কোনো ইনপুট নেই — একটি SQL query লেখো।
প্রতি লাইনে order_id, items_total_cents, payments_total_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)
1 890000 1340000 2 180000 180000 3 600000 600000 4 2000000 2000000 5 170000 170000 6 605000 605000 7 670000 670000 8 180000 180000 9 120000 120000 10 380000 380000
insert into payments (id,order_id,method,amount_cents,status,paid_at,transaction_ref) values (12,6,'bkash',100000,'paid','2026-10-21 09:00','BKPART1');
1 890000 1340000 2 180000 180000 3 600000 600000 4 2000000 2000000 5 170000 170000 6 605000 705000 7 670000 670000 8 180000 180000 9 120000 120000 10 380000 380000