select * from account where to_char((from_tz(cast(sysdate as timestamp), 'GMT') at time zone substr(time_zone, 4)), 'yyyymmdd') * 10000 + substr(work_starting_time, 1, 4) between to_char(systimestamp, 'yyyymmddhh24') * 10000 and to_char(systimestamp + interval '1' hour, 'yyyymmddhh24') * 10000;
요런 쿼리가 있는데요,
좌변이 해당 테이블의 time_zone, work_starting_time을 가공한 값으로 조회를 하게 되는데..
별로 좋은 쿼리가 아닌거 같아서 이럴때는 어떤식으로 조정하면 좋을까요?