i have column like below

studentid studentname sub1 sub2 sub3
1 aaa 40 70 90
2 bbb 60 80 50
i want to execute every student highest mark in which subject
my o/p like below
studentid studentname sub3 sub2
1 aaa 90
2 bbb 80

Answer Posted / sonal

Try below :

sel studentid,studentname, greatest(sub1,sub2,sub3) max_masks
from student

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different functions performed in development phase?

568


What is difference between user and database in teradata?

616


What are differences between teradata and ansi session modes in teradata?

617


how do we write scripts in unix how to execute scripts in real time anybody please needfull or give me number i will cal u

1274


How to select first n records in teradata?

605






how can we analyze the locks ?

1696


Difference between multiload and tpump?

617


What do you mean by ttu in teradata?

567


What are the functions of a Parser?

604


What are the multiload utility limitations?

590


What is a three-tier data warehouse?

625


What do you mean by teradata intellicloud?

591


What is the difference between global temporary tables and volatile temporary tables?

631


Can we collect statistics on table level?

598


What are the newly developed features of Teradata?

567