Created
August 11, 2010 18:40
-
-
Save ejhayes/519494 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select ncb.* | |
from | |
(select max(r_id) as r_id from ats.VW_NCB_QUARTERLY where cast(exec_date as DATETIME) between q2_start and q2_end group by ats) m | |
inner join ats.VW_NCB_QUARTERLY ncb | |
on m.r_id = ncb.r_id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment