Getting max value in oracle

Hello All,

I have a table with 4 columns.

Table A
Column1, Column2, COlumn3, Column4

I want to get Column1 and the max value of Column2, Column3, COlumn4. Can some one please provide me with an example on how to do this.

I am writing this query against Oracle database.

Any help is appreciated.

Thanks,
SRM.
SRM19Asked:
Who is Participating?
 
Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
I see
SELECT Column1, GREATEST(Column2, Column3 , Column4) FROM TABLE_A  

Open in new window

0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
that looks like:
SELECT Column1, MAX(Column2), MAX(Column3), MAX(Column4) FROM TABLE_A GROUP BY Column1 
but you might not have told the entire story?

Open in new window

0
 
SRM19Author Commented:
angell, thanks for the solution but that is not what I am looking for. I want the max of 3 columns(column2, column3, column4)
something like this max(column2, column3, column4).

Thanks.
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
0
 
SRM19Author Commented:
thanks angellll, it worked great.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.