mysql - Customized query for desired Report generation in Oracle -


following structure of table

column a, column b, column c value a,  value b,  value c1 value a,  value b,  value c2 value a2, value b2, value c3 

now, want result viewed result

column a, column b, column c  value a,  value b,  value c1         ,         ,         value c2 value a2, value b2, value c3 

so, if value of column , column b same , value of column c different then, how can take out result above example like, if multiple values of , b same c different

you should give tags , per question. have given mysql oracle 11g , oracle10g also.

okay .. query simple in oracle , following query tested in oracle database.

you can use row_number() function below -

select case          when rn_cnt = 1           columna          else           null        end columna,        case          when rn_cnt = 1           columnb          else           null        end columnb,        columnc   (select row_number() over(partition columna, columnb order columnc) rn_cnt,                columna,                columnb,                columnc           table_name) 

Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -