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
How do you find current date and time in oracle?
Where is the export dump file located?
Explain index?
What are the varoius components of physical database structure of oracle database?
What are the types of trigger in oracle?
How to create an oracle database manually?
What is transport network substrate (tns) in oracle?
Can select statements be used on views in oracle?
Can the query output be sorted by multiple columns in oracle?
What are the restrictions in a oracle read only transaction?
What is a private synonym?
How do I use unicode codesets with the weblogic jdriver for oracle driver?
how to clone 9i Database on to 10g Database.
Explain an integrity constrains?
Hi this srilatha. I comlpeted my Oracle-hrms. can u provide me interview questions on Core hr, payroll,sshr,OLM etc..