Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Discuss the advantages of using partitioned primary index in a query?

909


Why is the case expression used in teradata?

1025


How many codd's rules are satisfied by teradata database?

1050


What are the different methods ot loading a dimension table? A fact table etc?

980


What is a sparse index?

1024


What is spool space and when running a job if it reaches the maximum spool space how you solve the problem?

1059


How to find duplicates in a table?

1137


What are the available join types in teradata?

1013


If a Node is busy what are the steps you can take to avoid ?

2349


What is TPD?

1309


If RDBMS is halted what will you do ?

2099


Explain the most common data types used in teradata?

989


How would you load a very large file in teradata in general?

969


What do you mean by ttu in teradata?

974


In general, how do you optimze any sql in teradata?

976