I have 5 columns in sql table and I need all the 5 columns as out put but with distinct operation on three columns
Need to return all the columns with distinct operation
You can use a groupby for the three columns you want 'distinct'.
Can group by 3 but must use some type of aggregate function like min or max on the other two
select col1, col2, col3, max(col4), min(col5) from tbl group by col1, col2, col3