prqlc 0.13.11

PRQL is a modern language for transforming data — a simple, powerful, pipelined SQL replacement.
Documentation
1
2
3
4
5
6
7
8
9
10
11
from invoices
derive total = case [total < 10 => total * 2, true => total]
select { customer_id, invoice_id, total }
take 5
append (
  from invoice_items
  derive unit_price = case [unit_price < 1 => unit_price * 2, true => unit_price]
  select { invoice_line_id, invoice_id, unit_price }
  take 5
)
select { a = customer_id * 2, b = math.round 1 (invoice_id * total) }