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

Popular posts from this blog

How can we post XML strings along with text strings in iOS -

How to run C# code using mono without Xamarin in Android? -

c# - cefsharp app remember password option -