Q) How to Find Max Date from each Group? (Asked in Infosys
(INFI)Interview)
Answer Posted / d ashwin
AS OUR EXAMPLE HR SCHEMA FOR GROUP WISE MAX DATE...
SELECT * FROM HR.EMPLOYEES
WHERE HIRE_DATE IN
(SELECT MAX(HIRE_DATE) FROM HR.EMPLOYEES
GROUP BY DEPARTMENT_ID);
FOR SINGLE ROW MAX DATE...
SELECT * FROM
(
SELECT * FROM HR.EMPLOYEES
ORDER BY HIRE_DATE DESC)
WHERE ROWNUM = 1;
| Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
normally database take to refresh time 2 hours. but client asked iwant to refresh with in 5 min that same database. do you have any option in BO and Oracle? explain me briefly...kavi
What do you understand by a database object?
How to display employee records who gets more salary than the average salary in the department?
What is snapshot is too old? Give and example for better understand.
How to convert dates to characters in oracle?
How do I limit the number of oracle database connections generated by weblogic server?
How to define an anonymous block?
How to check the server version in oracle?
What is merge statement used for?
How to open and close an explicit cursor in oracle?
What is tns entry?
How can we find out the current date and time in oracle?
defination of bitmap index
Write a syntax for update query in oracle?
Explain oracle’s system global area (sga).