aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Ozeritskiy <aozeritsky@ydb.tech>2024-02-23 17:36:07 +0100
committerGitHub <noreply@github.com>2024-02-23 17:36:07 +0100
commit5200012e3935da2a9fede5d5f167c2aba151dff4 (patch)
tree7f76fde19e6183b6caca822248bbb5f253664a69
parent12aa9ef20bed963dec17a1f06f7eb2d061a75fd1 (diff)
downloadydb-5200012e3935da2a9fede5d5f167c2aba151dff4.tar.gz
Make queries 36,70,86 pg-compatible (#2215)
-rw-r--r--ydb/library/benchmarks/queries/tpcds/pg/q36.sql2
-rw-r--r--ydb/library/benchmarks/queries/tpcds/pg/q70.sql2
-rw-r--r--ydb/library/benchmarks/queries/tpcds/pg/q86.sql2
3 files changed, 6 insertions, 0 deletions
diff --git a/ydb/library/benchmarks/queries/tpcds/pg/q36.sql b/ydb/library/benchmarks/queries/tpcds/pg/q36.sql
index 0ffca8b4c65..2095a85b4c7 100644
--- a/ydb/library/benchmarks/queries/tpcds/pg/q36.sql
+++ b/ydb/library/benchmarks/queries/tpcds/pg/q36.sql
@@ -1,5 +1,6 @@
{% include 'header.sql.jinja' %}
+select * from (
select
sum(ss_net_profit)/sum(ss_ext_sales_price) as gross_margin
,i_category
@@ -22,6 +23,7 @@ select
and s_state in ('IN','AL','MI','MN',
'TN','LA','FL','NM')
group by rollup(i_category,i_class)
+) as sub
order by
lochierarchy desc
,case when lochierarchy = 0 then i_category end
diff --git a/ydb/library/benchmarks/queries/tpcds/pg/q70.sql b/ydb/library/benchmarks/queries/tpcds/pg/q70.sql
index 850e11c01e0..50c7f28f6c6 100644
--- a/ydb/library/benchmarks/queries/tpcds/pg/q70.sql
+++ b/ydb/library/benchmarks/queries/tpcds/pg/q70.sql
@@ -1,5 +1,6 @@
{% include 'header.sql.jinja' %}
+select * from (
select
sum(ss_net_profit) as total_sum
,s_state
@@ -30,6 +31,7 @@ select
where ranking <= 5
)
group by rollup(s_state,s_county)
+) as sub
order by
lochierarchy desc
,case when lochierarchy = 0 then s_state end
diff --git a/ydb/library/benchmarks/queries/tpcds/pg/q86.sql b/ydb/library/benchmarks/queries/tpcds/pg/q86.sql
index 945c50603c5..d6a27a15a6e 100644
--- a/ydb/library/benchmarks/queries/tpcds/pg/q86.sql
+++ b/ydb/library/benchmarks/queries/tpcds/pg/q86.sql
@@ -1,5 +1,6 @@
{% include 'header.sql.jinja' %}
+select * from (
select
sum(ws_net_paid) as total_sum
,i_category
@@ -18,6 +19,7 @@ select
and d1.d_date_sk = ws_sold_date_sk
and i_item_sk = ws_item_sk
group by rollup(i_category,i_class)
+) as sub
order by
lochierarchy desc,
case when lochierarchy = 0 then i_category end,