mediumMr DIY · mathBasic
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 |
Basic
The example input, expected output, and walkthrough for this question unlock with a Basic plan.
Basic
This is a Basic question
Premium practice questions unlock with a Basic plan. The full solution, expected output, and grading are available to Basic members.