Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Movp69
Starting Member
10 Posts |
Posted - 2009-03-19 : 12:05:41
|
hi, i've got 700,000 distinct customer id's in the usage table. I want the output of this join to total this 700,000. With a left join i get 2.6m with this join i also get 2.6m. I get the feeling that the count(distinct) is not producing the result i need. any ideas?? Thanks. Moselect a.Usage, c.packagedescription, count(distinct a.customerid)from mvp1.dbo.Usage1 ajoin suball_d b on a.customerid=b.customerid join mvp1.dbo.subs_package_description c on b.packageid=c.packageidjoin nameall d on b.nameid=d.nameidgroup by a.usage, c.packagedescriptionorder by 1,2 asc |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
|
|
|