blob: 8077b556f3064e27c8fcae7c63a22262a5afd570 [file] [log] [blame]
====
---- QUERY: TPCH-Q1
# Q1 - Pricing Summary Report Query
select
l_returnflag,
l_linestatus,
sum(l_quantity) as sum_qty,
sum(l_extendedprice) as sum_base_price,
sum(l_extendedprice * (1 - l_discount)) as sum_disc_price,
sum(l_extendedprice * (1 - l_discount) * (1 + l_tax)) as sum_charge,
avg(l_quantity) as avg_qty,
avg(l_extendedprice) as avg_price,
avg(l_discount) as avg_disc,
count(*) as count_order
from
customer.c_orders.o_lineitems
where
l_shipdate <= '1998-09-02'
group by
l_returnflag,
l_linestatus
order by
l_returnflag,
l_linestatus
---- RESULTS
'A','F',37734107.00,56586554400.73,53758257134.8700,55909065222.827692,25.522006,38273.129735,0.049985,1478493
'N','F',991417.00,1487504710.38,1413082168.0541,1469649223.194375,25.516472,38284.467761,0.050093,38854
'N','O',74476040.00,111701729697.74,106118230307.6056,110367043872.497010,25.502227,38249.117989,0.049997,2920374
'R','F',37719753.00,56568041380.90,53741292684.6040,55889619119.831932,25.505794,38250.854626,0.050009,1478870
---- TYPES
string, string, decimal, decimal, decimal, decimal, decimal, decimal, decimal, bigint
====