How do I remove repeated column values from report

后端 未结 2 459
予麋鹿
予麋鹿 2020-12-21 23:37

FROM THIS:

Hotel                     Type   Room Guest                                     From      To
    ------------------------- ------ ---- ----------         


        
2条回答
  •  抹茶落季
    2020-12-22 00:09

    How about using lag to access the previous row and check if it has the same value as the current one?

    select decode(hotel,
                  lag(hotel, 1, null) over (order by hotel, room, ...), null,
                  hotel) as "Hotel"
      from ...
    

提交回复
热议问题