![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
SQL代码
文章平均质量分 65
Tina_DT
这个作者很懒,什么都没留下…
展开
-
月报--充电量报表
一、计算各地市各月份社会月充电量1.新建表并计算1月份社会充电量create table SOCIAL_CHARGE_DATA_month(city,month,station_type,charging) asselect t.city,'2017-01',t.station_type,(sum(t.charging)/59)*31 from SOCIAL_CHARGE_DATA t wher...原创 2018-02-09 20:40:01 · 391 阅读 · 0 评论 -
每周充电数据导入流程
1.清空RECHARGER_REPORT_YYS2 表内容truncate table recharger_report_tmp2.按桩编号关联是否公用、是否高速、站编号和规范的站名update recharger_report_tmpt set (t.special_or_public,t.high_speed,t.station_num,t.station_nameyys)=(select p...原创 2018-02-09 20:45:55 · 295 阅读 · 0 评论 -
每周充值记录导入流程
1.清空REFILL_REPORT_YYS 表内容truncate table REFILL_REPORT_YYS 2.将新增记录插入到REFILL_REPORT表中insert into REFILL_REPORT(trade_type,trade_num, refill_money,refill_time,trade_company,refill_state,zheng_chong,refil...原创 2018-02-09 20:49:20 · 305 阅读 · 0 评论 -
日常统计代码
-------------------------------国网充电记录(RECHARGER_REPORT )------------------------------ 1.统计国网各月份各地市...原创 2018-02-09 20:57:18 · 758 阅读 · 0 评论 -
月报数据表准备
表1 国网(地市、月份、类别、充电量、充电次数、平均充电量、用户数、平均每用户充电量)create table monthly_stste_city asselect substr(t.trade_company,3,2) city,to_char(t.ending_time,'yyyy-mm') month,t.high_speed ||t.special_or_public station_...原创 2018-02-13 16:36:04 · 513 阅读 · 0 评论