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 / narasimha
SEL PROD_ID, GREATEST(JAN,FEB,MAR,APR) AS MAX_SALE FROM TABLE_NAME
QUALIFY ROW_NUMBER() OVER (ORDER BY MAX_SALE) =1;
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
If I wanted to run a TPump job only once per day - basically working on a file that is produced once per day - how would you set up the parameters for that sort of job ?
What are the different functions performed in development phase?
What type of indexing mechanism do we need to use for a typical data warehouse?
What do you mean by fastexport in teradata?
What are differences between teradata and ansi session modes in teradata?
What are the different functions included in the server software?
What are the uses of bynets in multi-node systems?
Can we have an unconnected lkp to lookup a db2 record against a teradata record? Doesnt seem to work. I could be wrong
What are the available primary index types in teradata.
What is teradata?
Difference between inner join and outer join?
What is the particular designated level at which a LOCK is liable to be applied in Teradata?
Explain amp in teradata?
What are the steps involved after the disk manager passes the request?
What are normalization, first normal form, second normal form and third normal form?