easyTraveloka · math
Line totals after a percentage discount
For each booking line item, compute the total after applying a percentage discount:
quantity × unit_price × (1 − discount_pct / 100)
Return item and line_total, rounded to 2 decimal places.
Schema
▸booking_items
| id | INT |
| item | TEXT |
| quantity | INT |
| unit_price | NUMERIC |
| discount_pct | INT |
Example input
▸booking_items