mediumMr DIY · math
Round prices up, round loyalty points down
Mr DIY always rounds the billed price up to the nearest ringgit, and always rounds loyalty points (1 point per ringgit) down.
Return customer, price_before_rounding, billed_price (rounded up), and loyalty_points (rounded down).
Schema
▸purchases
| id | INT |
| customer | TEXT |
| price_before_rounding | NUMERIC |
Example input
▸purchases
Stuck? Ask the coach for a nudge that won't give the answer away, or reveal the reference solution and a short walkthrough of why it works.