mahir_data
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
idINT
itemTEXT
quantityINT
unit_priceNUMERIC
discount_pctINT

Example input

booking_items