Coupon Usage Rate
Medium
Inventory & E-commerce Cases
Return the percentage of orders that used a coupon (coupon_code is not NULL), rounded to two decimals.
Table schema
Orders(id INT PRIMARY KEY, coupon_code VARCHAR(10) NULL)Sample data
id | coupon_code
1 | SAVE10
2 | NULL
3 | SAVE20
4 | SAVE10
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.