TCS recently asked this question
I have records like below
Emp id Empname Salary DateTimestamp
1 AA 6000 20120609:11:30
1 AA 7000 20120609:12:30
1 AA 8000 20120609:01:30
I want to exceute records max timestamp(20120609:01:30)
Answer Posted / rkraju
HI,
U WANT TO DISPLAY MAX TIMESTAMP
SO THE QUERY IS
SELECT * FROM TABLENAME WHERE DATETIMESTAMP IN(SELECT
MAX(DATETIMESTAMP) FROM TABLENAME);
| Is This Answer Correct ? | 18 Yes | 0 No |
Post New Answer View All Answers
How to select first n records in teradata?
What is basic teradata query language?
Explain the teradata primary index mechanics in detail with a diagram.
What are the different design perspectives used in teradata?
What is the use of teradata system software?
How to write the query . eid enm doj dob i want to display the names who worked more than 25 years .
In BTEQ, how are the session-mode parameters being set?
Syntax for case when statement?
If the PMON is not working then how do you identify and monitor all the processes, resources and sessions ?
What are default access rights in teradata? What explicit right can be given to a user?
What's the difference between timestamp (0) and timestamp (6)?
Highlight the need for Performance Tuning.
What do you mean by teradata sql assistant?
What is the opening step in basic teradata query script?
Difference between multiload and tpump?