blob: 13943752d9319df695e562d246ef5fc7b2932588 [file] [log] [blame]
-- Inner join
-- With count distinct in both having clause and projection list, columns from different tables
-- And one more distinct aggregate from the same table
select
count(*),
count(distinct a.c_boolean)
from
alltypes a,
alltypes b
where
a.c_timestamp = b.c_timestamp
having
count(distinct b.c_date) > 50 or
sum(distinct b.c_integer) > 0;