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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 select distinct number with other column

Author  Topic 

kote_alex
Posting Yak Master

112 Posts

Posted - 2009-10-16 : 09:27:24

select distinct x,count(x),cash from xxx
group by x ,cash
having count(x)='1'
order by x,cash

I just want to select the distinct entries with the distinct cash payment to the distinct client nb.

Any ideas ?
Thanks !

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-10-16 : 09:31:52
And what is the problem?
Sample data?
Wanted output?


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

kote_alex
Posting Yak Master

112 Posts

Posted - 2009-10-16 : 09:38:00
wanted data ... i can't select what the distinct columns together x distinct , cash distinct ...
Go to Top of Page

kote_alex
Posting Yak Master

112 Posts

Posted - 2009-10-16 : 10:18:15
bump
Go to Top of Page

kote_alex
Posting Yak Master

112 Posts

Posted - 2009-10-17 : 02:24:56
nobody ?
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2009-10-17 : 02:31:01
kote,

We need to know what do you want. Show us your sample data and expected output

quote:
Originally posted by webfred

And what is the problem?
Sample data?
Wanted output?



No, you're never too old to Yak'n'Roll if you're too young to die.




KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -