1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-11-08 03:42:19 +03:00
Files
mariadb-columnstore-engine/utils/scenarios/perf/source/iteration17queries/Deferred/q5.1.1.original.sql
2016-01-06 14:08:59 -06:00

12 lines
336 B
SQL
Executable File

select p_brand, sum(l_quantity) tot_qty,
avg(l_quantity) avg_qty,
sum(l_extendedprice * (1- l_discount )) tot_price,
avg(l_extendedprice * (1- l_discount )) avg_price, count(*)
from lineitem, part
where l_shipdate between '1996-04-01' and '1996-04-14'
and l_partkey = p_partkey
and p_size = 5
group by rollup( p_brand)
order by 1;