Debian Codegraph @

tests/inputs/invoices.prql

raw
1 # https://prql-lang.org/
2 from invoices
3 filter invoice_date >= @1970-01-16
4 derive {
5 transaction_fees = 0.8,
6 income = total - transaction_fees
7 }
8
9 filter income > 1
10
11 group customer_id (
12 aggregate {
13 average total,
14 sum_income = sum income,
15 ct = count total,
16 }
17 )