Prepare for your Next Interview
This is a discussion on Hoe do I get Top 2 by Max Date for each EEID? within the SQL Server forums, part of the Databases category; Hi, I am new to SQL coding and I want to get Top 2 Records by Max(T1.ejhdatetimecreated) by each EEID. Can someone please help me? Thanks select T1....
|
|||
|
Hoe do I get Top 2 by Max Date for each EEID?
Hi, I am new to SQL coding and I want to get Top 2 Records by Max(T1.ejhdatetimecreated) by each EEID. Can someone please help me? Thanks
select T1.ejheeid, T1.ejhannsalary, Max(T1.ejhdatetimecreated), T1.ejhhourlypayrate, T1.ejhisratechange, T1.ejhjobeffdate from dbo.emphjob T1 where T1.ejheeid in ('5GQK0K0000K0','5U8FSP0000K0','5U8FUX0000K0','5U8FX30000K0','5U8GEV0030K0','5U8GKD0000K0','5U8GNG0030K0','5U8GO30000K0','5U8GOR0030K0','5U8GSE0000K0','5U8GXL0000K0','5U8GYT0000K0','5U8H000000K0') Group By T1.ejheeid, T1.ejhannsalary, T1.ejhhourlypayrate, T1.ejhisratechange, T1.ejhjobeffdate order by T1.ejheeid , T1.ejhannsalary |
| Sponsored Links |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to convert system date to specified date in QTP 9.2? | mythreyi | QTP | 10 | 05-29-2008 08:38 AM |
| Hire date and salary review date | Geek_Guest | SQL | 2 | 10-23-2007 02:09 AM |
| Date Prompt | silu.davidson | Data Warehousing | 0 | 09-27-2007 08:08 AM |
| Can I have more than one date dimension | Geek_Guest | Data Warehousing | 1 | 06-27-2007 02:51 PM |
| romise date, Need by date, Original Date in PO | Geek_Guest | Oracle Apps | 0 | 04-06-2007 11:53 PM |