SQL count without wrapping query -
i have following hypothetical code , works getting number of rows of site
select count(*) ( select site (select...) x left join foo.bars on foo.id = x.id group site ) is there other way count without using outer select?
you can want count(distinct):
select count(distinct site) (select...) x left join foo.bars on foo.id = x.id; the 1 difference original version count null value of site. if important, query can modified take account.
Comments
Post a Comment