Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DISTINCT statement help

Status
Not open for further replies.

MersenneTwister

Programmer
Feb 19, 2006
2
CA
Hi, this will probably sound like a very simple SQL question, but I can't seem to figure it out...
So let's say I have a statement:

SELECT DISTINCT date, rate from...where...

So I know this statement will retrieve only unique combinations of both date and rate, but what I want is to retrieve the entries with the unique dates only and also the rates corresponding to each unique date, but not unique combinations of the two.
Thanks.

 
If you have the data

dateColumn | rateColumn
------------------
2006-04-23 | 1234
2006-04-23 | 5678

what result do you want? It is not clear from your post.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top