Click here to Skip to main content
15,885,141 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
How do I query that I get a distinct clubName based on my query? Below is the website to demo the sql query.

http://www.sqlfiddle.com/#!2/54be8b/6[^]
Posted
Comments
OriginalGriff 17-Oct-14 2:28am    
Why would I want to go to a random website to try and work out what you are trying to do?
Edit your question, dump the link and explain your tables and exactly what you are trying to do - otherwise it just looks like your homework and you are too lazy to even work it out for us. And we don't do your homework.
So explain what you need, what you have tried, and where you are stuck - or you will probably get nothing much helpful!
Help us to help you!

Use the "Improve question" widget to edit your question and provide better information.
Maciej Los 17-Oct-14 2:35am    
There are distinct values! Each club name corresponds to person name.
Not sure what you mean by saying disticnt in this context...

Your table have not any duplicate records ..

that have only Clubname & ID are same but Last Name & First Name are Different .. So your query will retrieve all values ..

if you want to retrieve group distinct use this query ..

SQL
select clubname,id,lastname,firstname from persons group by clubname



Thanks
AARIF SHAIKH
 
Share this answer
 
Using the
SQL
Distinct 
keyword in
SQL
Sql


by the way, your fiddle link not showing anything.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900