select t.*
from dengji_hotel t
order by to_char(t.rz_date,'yyyymmdd')
,t.hotel_name
,t.hotel_room
,id desc
from dengji_hotel t
order by to_char(t.rz_date,'yyyymmdd')
,t.hotel_name
,t.hotel_room
,id desc
调试欢乐多
(select id,name,row_number()over(partition by to_char rz_date,'yyyymmdd'),hotel_name,hotel_room order by id) rn from dengji_hotel) b
where a.id = b.id and b.rn > 1;
select rid from (
select count(id)over(partition by trunc(rz_date),hotel_name,hotel_room)as rank_id, rowid as rid from dengji_hotel
)
where rank_id >= 2
)