昨天要写的sql
代码
select * from grouptest,
(
select code, MAX(createtime) as tt from dbo.GroupTest
group by code
) main
where main.code = grouptest.code and main.tt = grouptest.createtime
group by id, grouptest.code
(
select code, MAX(createtime) as tt from dbo.GroupTest
group by code
) main
where main.code = grouptest.code and main.tt = grouptest.createtime
group by id, grouptest.code
走向地狱的途中,不小心走了程序员这条路,路上一个个黑心的老板,和暗无天日的加班,我才发现,通往地狱的路径中,我们这行是最短的。