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

Answers were Sorted based on User's Feedback



i have column like below studentid studentname sub1 sub2 sub3 1 aaa 40 70 ..

Answer / radhika

Sel studentid,studentname,greatest(sub1,sub2,sub3) from tablename;

Is This Answer Correct ?    0 Yes 0 No

i have column like below studentid studentname sub1 sub2 sub3 1 aaa 40 70 ..

Answer / 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

More Teradata Interview Questions

what is the structure of UV table in MLOAD?

4 Answers   Cap Gemini,


What is logical data model?

0 Answers  


How can we build data marts from FSLDM. is there any standard approach for this?Is FSLDM supports place ?

2 Answers  


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

0 Answers  


What are the various reporting tools in the market?

0 Answers  






What is database exceptions in teradata?

0 Answers  


In which scenarios we use Volatile tables and Global temporary Tables in Real time? Please give me one real time scenario???I know wat is its use??

3 Answers   CTS, Lexicon,


Explain teradata vs. Redshift?

0 Answers  


Highlight the advantages of PPI(Partition Primary Index).

0 Answers  


What are the string manipulation operators and functions associated with teradata?

0 Answers  


What is a sparse index?

0 Answers  


1. generally how many node system will be used by the client. 2. while running mload if the job is aborted/failed at any phase what we have to look after to run the job successfully? 3.i wanted to know how to write the fastload script for table creation as well as table loading in a single script?

3 Answers  


Categories