i have a table like sales....the field are

Prodid Jan(jam month sales)Feb March

1 20 76 50
2 30 94 40
3 40 90 30
4 70 20 30
5 23 40 40
6 85 30 55
7 84 20 65
8 10 93 40
9 57 30 30
10 38 83 40
11 35 39 90
12 83 89 50
Now the Question is i want get the max sales of 12 products
from the months.hint:for eg I WANT GET 89 for product12...

Can any one help me

Answer Posted / pavan

sel case
when m1-m2 >0 and m1-m3 >0 then m1
when m2-m1>0 and m2-m3>0 then m2
when m3-m1>0 and m3-m2 >0 then m3
end as maxmaks,m1,m2,m3,id from ttemp.t3;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is spool space? Why do you get spool space errors? How do trouble-shoot them?

533


Hi, If anyone has TD 14 Basics dumps or study materials, please share. nirmaaal1991@gmail.com

1958


Describe the set operators in teradata.

581


What is inner join and outer join?

612


What is logical data model?

636






How is MLOAD Teradata Server restarted after execution?

645


What are the functions of a teradata dba?

596


In a table can we use primary key in one column and in another column both unique and not null constrains.if yes how?

569


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

633


how do you manage the production space. what are the proactive methods you can take ?

1473


How to eliminate product joins in a teradata sql query?

599


What is a node in teradata? Explain

599


What is the use of virtual processor connectivity in teradata?

563


how can we analyze the locks ?

1696


How to load specific no.of records using bteq, or fastload,or multiload

1315