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
What is spool space? Why do you get spool space errors?
What is inner join and outer join?
How can bottlenecks be identified?
Explain the advantages of partitioned primary index in a query?
What is the difference between teradata and oracle?
Define views in teradata with syntax.
What is upsert statement in teradata?
Explain BYNET.
What do high confidence, low confidence and no confidence mean in explain plan?
How do you set the session mode parameters in bteq?
What are the various etl tools in the market?
How to load specific no.of records using bteq, or fastload,or multiload
What are tpump utility limitations?
What is basic teradata query language?
What is a three-tier data warehouse?