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')' –