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

what is object level locking ? where do appear this type of locking ?

3109


Why is the case expression used in teradata?

583


Explain teradata vs. Redshift?

553


What is the primary index in teradata?

584


What are default access rights in teradata?

619






What are the various indexes in teradata? How to use them? Why are they preferred?

589


What is the function of parser component in teradata?

617


What is the use of fallback?

555


Explain teradata architecture?

630


Backup Script was blocked then you are unable to archive the data. how do you analyze it and where do you identify ?

1495


Which is faster fastload or multiload?

593


What are the available primary index types in teradata.

583


Explain PDE.

600


Is multi insert ansi standard?

1744


What is a sparse index?

624