select to_date(substr(t20.EVENT_TIME1,1,9),'YYYY/MM/DD'), round(count(distinct t20.PRODUCT_ID) / (select count( distinct PRODUCT_ID) from tb_product_info),3) to11, 1- round(count(distinct t20.PRODUCT_ID) / (select count( distinct PRODUCT_ID) from tb_product_info),3) to12 from ( select t1.EVENT_TIME EVENT_TIME1,t2.* from ( select t1.* ,t2.event_time from tb_order_detail t1 left join tb_order_overall t2 on t1.order_id=t2.order_id where to_date(EVENT_TIME,'YYYY/MM/DD hh24:mi:ss') between date'2021-10-1' and date'2021-10-4' ) t1 left join (select t1.* ,t2.event_time from tb_order_detail t1 left join tb_order_overall t2 on t1.order_id=t2.order_id ) t2 on 1=1 and to_date(t2.EVENT_TIME,'YYYY/MM/DD hh24:mi:ss') >= to_date(substr(t1.EVENT_TIME,1,9),'YYYY/MM/DD') -5 and to_date(t2.EVENT_TIME,'YYYY/MM/DD hh24:mi:ss') <= to_date(substr(t1.EVENT_TIME,1,9),'YYYY/MM/DD') +1 ) t20 group by to_date(substr(t20.EVENT_TIME1,1,9),'YYYY/MM/DD') order by to_date(substr(t20.EVENT_TIME1,1,9),'YYYY/MM/DD')
点赞

相关推荐

程序员花海_:实习和校招简历正确格式应该是教育背景+实习+项目经历+个人评价 其中项目经历注意要体现业务 实习经历里面的业务更是要自圆其说 简历模板尽可能保持干净整洁 不要太花哨的
点赞 评论 收藏
分享
12-05 18:09
已编辑
广东药科大学 后端工程师
点赞 评论 收藏
分享
12-27 22:21
门头沟学院 Java
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务