Link to home
Create AccountLog in
Avatar of indikad
indikad

asked on

SQL distinct query question - ( T SQL - SQL Server )

appreciate if someone can help me here.
I have a table with sample data as follows.

Id     Ref    Type
1      261    17
2      261    17
3      261    13
4      261    13
5      560    17

Open in new window


I need my query to get only unique sets of Ref + Type be something line distinct (Ref) and Distinct(Type)

so that my result looks like

Ref    Type
261    17
261    13
560    17

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of duttcom
duttcom
Flag of Australia image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of indikad
indikad

ASKER

thanks - is that all ????   guess I was a bit sleepy and trying different other things.

Thanks for all - and points given.