sql - Distinct records by column value -


let's have query output given table:

number    data   info 123    data1   info1 456    data2   info2 789    data3   info3 123    data4   info4 

i want same table columns, without records number column gotten(not best phrasing there, sorry) . distinct.

it not matter me record number keep in result.

so output looking is:

 number    data   info     123    data1   info1     456    data2   info2     789    data3   info3 

i using oracle sql.

thanks in advance!

you can change aggregate function max others different values data , info

select number, max(data) data, max(info) info table group number 

first() might make sense you. here oracle docs on aggregate functions: https://docs.oracle.com/database/121/sqlrf/functions003.htm#sqlrf20035


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

css - Can I use the :after pseudo-element on an input field? -