If you want to find all the rows which have the same calendar date (ignoring time) as the max date in the table, you can do something like:
- Find the MAX data
- TRUNC() it to get start of the day
- Find all the rows greater than this value
For example:
with rws as (
select t.*,
max ( tour_time ) over () mx_dt
from tour_detail t
)
select tour_time + 1
from rws
where tour_time > trunc ( mx_dt );