居然把yyyy--mm定义为floatl类型??
select * from
(select t.*,row_number() over(order by yyyy desc,mmdesc) seq from table)r
where r.seq = 1
select * from
(select t.*,row_number() over(order by yyyy desc,mmdesc) seq from table)r
where r.seq = 1
select * from table a where a.yyyy=(select max(yyyy) from table b) and a.mm=(select max(mm) from table c)
请这样试试
select * from table a where a.yyyy=(select max(yyyy) from table b) and a.mm=(select max(mm) from table c)应该是这样的吧
select * from table a where a.yyyy=(select max(yyyy) from table b) and a.mm=(select max(mm) from table c where c.yyyy=a.yyyy)
需要有(yyyy,mm)双列索引
不过最关键的问题是搂主的表结构太不专业了