sql server 2005 - how to take unique values in sql -
select distinct customerid, adress left join b on a.customerid=b.customerid points > 15
so after gives me result customerids , adresses, incase customer may have 2 ids, example or has twice registered, address same.
how can take unique values adress, adress unique, if there 2 different ids have same adress sql has leave 1 value.
please help!
select adress, max(a.customerid) left join b on a.customerid=b.customerid points > 15 group adress
Comments
Post a Comment