blob: 1555fc93a084c6ecf46bba8320470619e435946d [file] [log] [blame]
-- multiple partitions: all have order by clause, partition by on a single (different) column
-- subquery with filter
SELECT *
FROM
(
SELECT
count(*) OVER (PARTITION BY c_date ORDER BY c_time) + sum(c_integer) OVER (PARTITION BY c_bigint ORDER BY c_time) AS total,
count(*) OVER (PARTITION BY c_integer ORDER BY c_time) AS count1,
sum(c_integer) OVER (PARTITION BY c_date ORDER BY c_time) AS count2
FROM j1
) sub
WHERE total <> count1 + count2;