Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

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

2204


What do you understand by a database object?

1055


How to display employee records who gets more salary than the average salary in the department?

1065


What is snapshot is too old? Give and example for better understand.

1601


How to convert dates to characters in oracle?

1038


How do I limit the number of oracle database connections generated by weblogic server?

1066


How to define an anonymous block?

1149


How to check the server version in oracle?

1092


What is merge statement used for?

1022


How to open and close an explicit cursor in oracle?

1050


What is tns entry?

1139


How can we find out the current date and time in oracle?

1087


defination of bitmap index

2117


Write a syntax for update query in oracle?

1030


Explain oracle’s system global area (sga).

1137