0
如何將query1的結果分配給query2? (結果有小數點)謝謝:oracle中的查詢分區
QUERY1:
select count(*) as aa
from registered_devices
where status = 1;
QUERY2:
select sum(last_count) as current_daily
from statistics
where to_char(counter_date, 'YYYYMMDDHH24') between to_char (sysdate - 1, 'YYYYMMDDHH24')
and to_char (sysdate - 1 /24, 'YYYYMMDDHH24')
and counter_type = 'WS_GET_OFFER_ACCEPT'
不要比較字符串,使簡單的'where counter_date sysdate-1和sysdate - 1/24'之間, TRUNC(sysdate - 1,'MI')和TRUNC(sysdate - 1/24,'MI')之間的TRUNC(counter_date,'MI')' –