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


Please Help Members By Posting Answers For Below Questions

Name the five phases that come under MultiLoad Utility.

591


What is a clique?

587


Explain Teradata performance tuning and optimization?

703


What is meant by a Least Cost Plan?

629


What is the purpose of upsert command?

597






Explain some differences between mpp and smp?

597


What is the purpose of joins in teradata?

546


Explain fastload in teradata?

603


What are the available primary index types in teradata.

592


What is a node in teradata? Explain

605


What are the functions involved in shared information architecture?

608


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

666


What is a level of granularity of a fact table?

646


Highlight all the modes that are present under Confidence Level.

546


What is meant by a dispatcher?

572