我有这个查询,我从三个表中选择
select
min(t.ReminderDt) as 'rem dt',
m.Group_Id, m.AccountNumber
from
ACE_AccsLevelTran t, ACE_AccsLevelMaster m
where
t.MasterAccNumber = m.AccountNumber
group by
m.Group_Id, m.AccountNumber;
这导致:
rem dt | Group_Id| AccountNumber
--------------------------------
2/8/2013 | 3 | 4216985
2/22/2013 | 4 | 4274863
2/7/2013 | 3 | 4366383
2/28/2013 | 4 | 7151712
如何仅获取 3 和 4 的最短日期的行,如结果 -
2/7/2013 | 3 | 4366383
2/22/2013 | 4 | 4274863