Skip to content

Commit dcd97c1

Browse files
committed
pivot test sqls a little tweaked so parseing deparsing will work
1 parent eb480d7 commit dcd97c1

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
select *
22
from (select customer_id, product_code, quantity
33
from pivot_test)
4-
pivot xml (sum(quantity) as sum_quantity for (product_code) in (select distinct product_code
4+
pivot xml (sum(quantity) as sum_quantity for product_code in (select distinct product_code
55
from pivot_test))
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
select *
22
from (select product_code, quantity
33
from pivot_test)
4-
pivot xml (sum(quantity) as sum_quantity for (product_code) in (select distinct product_code
4+
pivot xml (sum(quantity) as sum_quantity for product_code in (select distinct product_code
55
from pivot_test
66
where id < 10))
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
select *
22
from (select customer_id, product_code, quantity
33
from pivot_test)
4-
pivot (sum(quantity) as sum_quantity for (product_code) in ('a' as a, 'b' as b, 'c' as c))
4+
pivot (sum(quantity) as sum_quantity for product_code in ('a' as a, 'b' as b, 'c' as c))
55
order by customer_id
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
select *
22
from (select product_code, quantity
33
from pivot_test)
4-
pivot (sum(quantity) as sum_quantity for (product_code) in ('a' as a, 'b' as b, 'c' as c))
4+
pivot (sum(quantity) as sum_quantity for product_code in ('a' as a, 'b' as b, 'c' as c))

0 commit comments

Comments
 (0)