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

Prodid Jan(jam month sales)Feb March apr may jun july

1 20 76 50 74 94 93 83
2 30 94 40 94 93 93 02
3 40 90 30 49 94 92 56
4 70 20 30 93 46 35 78
5 23 40 40 39 84 46 57
6 85 30 55 93 46 46 46
7 84 20 65 83 56 57 57
8 10 93 40 93 68 57 36
9 57 30 30 83 67 57 79
10 38 83 40 83 55 68 47
11 35 39 90 94 57 78 47
12 83 89 50 93 79 69 69
i wat ti find the max sales of every product which i want to
load into target table

Answer Posted / vaishnavi

Greatest and LEast cannot be used in Teradata. It does not
support those two clauses.
The only option is by using Case Stmnt as given above.
But then if the no.of Column increases(say 200) , its
tedious to write a complex Case stmnt and also it not a
optimised way of writing such queries.
HOping to see more better ans for this question. Also it is
a commonly repeated ques in most of the interviews.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to select first n records in teradata?

814


What is called partitioned primary index (ppi)?

754


Describe the set operators in teradata.

767


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

741


How to find duplicates in a table?

863


Explain the term 'foreign key' related to relational database management system?

754


What is a clique?

785


What is stored procedure in teradata?

781


hi frnds i want to learn teradata utilities and teradata dba real time. i have 1+ years of experience in teradata. so i want to go deeply in Tearada. plz let me know at my email id who r best to learn from. im lookng for a realtime guy in HYD or Banglr. Thanks in advance. Rajesh my email-id: rajeshmss87@gmail.com

2561


What are the available join types in teradata?

811


What are the 5 phases in a multiload utility?

806


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

1524


What is the maximum number of dml can be coded in a multiload script?

825


How does hashing happens in teradata?

840


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

1482