select * from dengji_hotel a, (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 * from dengji_hotel where rowid in ( 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 )
(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
)