Hi,
I am trying to pull some data from 2 tables without getting duplicates. Each table has a field called user.
table1 has user and score
tabe2 has user and name
I am try to pull the 3 best scores from table1 without duping. IE if user1 has top score, he is done.
Here is my code:
select distinct(table1.username),table1.score,table2.username from table1 LEFT JOIN username ON table1.uid=table2.uid where table1.blah='whatever' order by table1.score DESC limit 3
I keep getting duplicate users. I tried an inner join I found here but got same results.
any help is appeciated