Skip to content

Commit 37ae9cc

Browse files
authored
Canonical request for tpc-h pg syntax (#11018)
1 parent 1a50a11 commit 37ae9cc

File tree

22 files changed

+51
-51
lines changed

22 files changed

+51
-51
lines changed

ydb/library/benchmarks/queries/tpch/pg/q1.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ select
1818
from
1919
{{lineitem}}
2020
where
21-
l_shipdate <= date '1998-12-01' - interval '100' day
21+
l_shipdate <= date '1998-12-01' - interval '90' day
2222
group by
2323
l_returnflag,
2424
l_linestatus

ydb/library/benchmarks/queries/tpch/pg/q10.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ from
2121
where
2222
c_custkey = o_custkey
2323
and l_orderkey = o_orderkey
24-
and o_orderdate >= date '1993-12-01'
25-
and o_orderdate < date '1993-12-01' + interval '3' month
24+
and o_orderdate >= date '1993-10-01'
25+
and o_orderdate < date '1993-10-01' + interval '3' month
2626
and l_returnflag = 'R'
2727
and c_nationkey = n_nationkey
2828
group by

ydb/library/benchmarks/queries/tpch/pg/q11.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ from
1414
where
1515
ps_suppkey = s_suppkey
1616
and s_nationkey = n_nationkey
17-
and n_name = 'CANADA'
17+
and n_name = 'GERMANY'
1818
group by
1919
ps_partkey having
2020
sum(ps_supplycost * ps_availqty) > (
@@ -27,7 +27,7 @@ group by
2727
where
2828
ps_suppkey = s_suppkey
2929
and s_nationkey = n_nationkey
30-
and n_name = 'CANADA'
30+
and n_name = 'GERMANY'
3131
)
3232
order by
3333
value desc;

ydb/library/benchmarks/queries/tpch/pg/q12.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ from
2323
{{lineitem}}
2424
where
2525
o_orderkey = l_orderkey
26-
and l_shipmode in ('MAIL', 'TRUCK')
26+
and l_shipmode in ('MAIL', 'SHIP')
2727
and l_commitdate < l_receiptdate
2828
and l_shipdate < l_commitdate
2929
and l_receiptdate >= date '1994-01-01'

ydb/library/benchmarks/queries/tpch/pg/q13.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ from
1515
from
1616
{{customer}} left outer join {{orders}} on
1717
c_custkey = o_custkey
18-
and o_comment not like '%unusual%requests%'
18+
and o_comment not like '%special%requests%'
1919
group by
2020
c_custkey
2121
) as c_orders (c_custkey, c_count)

ydb/library/benchmarks/queries/tpch/pg/q14.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ from
1515
{{part}}
1616
where
1717
l_partkey = p_partkey
18-
and l_shipdate >= date '1994-08-01'
19-
and l_shipdate < date '1994-08-01' + interval '1' month;
18+
and l_shipdate >= date '1995-09-01'
19+
and l_shipdate < date '1995-09-01' + interval '1' month;
2020

2121

ydb/library/benchmarks/queries/tpch/pg/q15.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ create view revenue0 (supplier_no, total_revenue) as
1111
from
1212
{{lineitem}}
1313
where
14-
l_shipdate >= date '1997-03-01'
15-
and l_shipdate < date '1997-03-01' + interval '3' month
14+
l_shipdate >= date '1996-01-01'
15+
and l_shipdate < date '1995-01-01' + interval '3' month
1616
group by
1717
l_suppkey;
1818

ydb/library/benchmarks/queries/tpch/pg/q16.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ from
1414
{{part}}
1515
where
1616
p_partkey = ps_partkey
17-
and p_brand <> 'Brand#33'
18-
and p_type not like 'PROMO POLISHED%'
19-
and p_size in (20, 27, 11, 45, 40, 41, 34, 36)
17+
and p_brand <> 'Brand#45'
18+
and p_type not like 'MEDIUM POLISHED%'
19+
and p_size in (49, 14, 23, 45, 19, 3, 36, 9)
2020
and ps_suppkey not in (
2121
select
2222
s_suppkey

ydb/library/benchmarks/queries/tpch/pg/q17.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ from
1111
{{part}}
1212
where
1313
p_partkey = l_partkey
14-
and p_brand = 'Brand#35'
15-
and p_container = 'LG DRUM'
14+
and p_brand = 'Brand#23'
15+
and p_container = 'MED BOX'
1616
and l_quantity < (
1717
select
1818
0.2 * avg(l_quantity)

ydb/library/benchmarks/queries/tpch/pg/q18.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ where
2323
{{lineitem}}
2424
group by
2525
l_orderkey having
26-
sum(l_quantity) > 315
26+
sum(l_quantity) > 300
2727
)
2828
and c_custkey = o_custkey
2929
and o_orderkey = l_orderkey

0 commit comments

Comments
 (0)