如何按时应用聚合功能?

时间:2014-02-20 05:48:24

标签: sql unicode

假设我在time_max列中有多个时间值,我想要平均值。所有。

我无法执行相同的操作。

PFB查询我正在使用

select avg(d_run_start_time)
  from gaurav_job_log
 where fic_mis_date>='15/Nov/2013'
   and fic_mis_date <='15/Feb/2014'
   and v_interface_id like '%BUDA_PEST_first_cut%' 
 group by v_interface_id ;

1 个答案:

答案 0 :(得分:0)

select CAST(AVG(CAST(d_run_start_time AS FLOAT)) AS datetime) as Avgdatetime
  from gaurav_job_log
 where fic_mis_date>='15/Nov/2013'
   and fic_mis_date <='15/Feb/2014'
   and v_interface_id like '%BUDA_PEST_first_cut%' 
 group by v_interface_id ;