select *
from (select row_number() over(partition by date1, no1, no2, no3, no4, no5 order by time1 DESC) r,
t.*
from table1 t)
from (select row_number() over(partition by date1, no1, no2, no3, no4, no5 order by time1 DESC) r,
t.*
from table1 t)
where r = 1
与
select date1, no1, no2, no3, no4, no5, count(1)
from table1 t
group by date1, no1, no2, no3, no4, no5
having count(1) > 0
返回的结果条数相同