Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Omit row data for distinct columns

catastropheApr 12 2010 — edited Apr 13 2010
Hi everybody,

I have result as
ID     COL_1   COL_2           COL_3    COL_4         SCORE    COL_6
-----------------------------------------------------------------------------------------------
22	120	    Adam 	        0            5.3	        20	    FALSE
22	9	    Nina	        0	     0.65	        20	    TRUE
23	66 	    Tom	        2457	     2.46 	        20	    TRUE
23	54	    Anna 	        3338	     4.79	        20	    FALSE
but I want to get result as below. I mean, one score number for each id.
ID     COL_1   COL_2           COL_3    COL_4         SCORE    COL_6
-----------------------------------------------------------------------------------------------
22	120	    Adam 	        0            5.3	        20	    FALSE
22	9	    Nina	        0	     0.65	        0	    TRUE
23	66 	    Tom	        2457	     2.46 	        20	    TRUE
23	54	    Anna 	        3338	     4.79	        0	    FALSE
How can I get this result?

There should be many rows for each id. It is not fixed. And table is big.

Thanks in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 11 2010
Added on Apr 12 2010
2 comments
623 views