I have a table as below.
Id username userid documenttype
1 abc 101 type1
2 abc 102 type2
3 abc 101 type3
4 def 102 type3
5 ghi 103 type4
I need to perform distinct on two columns (username and userid) and store it into a new table
Id username userid
1 abc 101
2 abc 102
3 def 102
4 ghi 103