|
@@ -13,11 +13,11 @@
|
|
FROM ( SELECT wd.well_id,
|
|
FROM ( SELECT wd.well_id,
|
|
TO_CHAR(wd.prod_date , 'YYYY-MM-DD') prod_time_str,
|
|
TO_CHAR(wd.prod_date , 'YYYY-MM-DD') prod_time_str,
|
|
COALESCE(wd.gas_prod_daily, 0) gas_prod_daily,
|
|
COALESCE(wd.gas_prod_daily, 0) gas_prod_daily,
|
|
- COALESCE(wd.oil_prod_daily, 0) oil_prod_daily,
|
|
|
|
- COALESCE(wd.fluid_prod_daily, 0) fluid_prod_daily,
|
|
|
|
- COALESCE(wd.water_prod_daily, 0) water_prod_daily,
|
|
|
|
|
|
+ COALESCE(wd.oil_prod_daily, 0)/10000 oil_prod_daily,
|
|
|
|
+ COALESCE(wd.fluid_prod_daily, 0)/10000 fluid_prod_daily,
|
|
|
|
+ COALESCE(wd.water_prod_daily, 0)/10000 water_prod_daily,
|
|
COALESCE(wd.water_cut, 0) water_cut,
|
|
COALESCE(wd.water_cut, 0) water_cut,
|
|
- COALESCE(wd.inj_vol_daily) inj_vol_daily
|
|
|
|
|
|
+ COALESCE(wd.inj_vol_daily)/10000 inj_vol_daily
|
|
FROM by_dwr.fact_dwr_pc_pro_well_vol_d wd
|
|
FROM by_dwr.fact_dwr_pc_pro_well_vol_d wd
|
|
WHERE wd.prod_date <![CDATA[ >= ]]> to_date(#{startDay},'YYYY-MM-DD')
|
|
WHERE wd.prod_date <![CDATA[ >= ]]> to_date(#{startDay},'YYYY-MM-DD')
|
|
and wd.prod_date <![CDATA[ <= ]]> to_date(#{endDay},'YYYY-MM-DD')
|
|
and wd.prod_date <![CDATA[ <= ]]> to_date(#{endDay},'YYYY-MM-DD')
|
|
@@ -57,12 +57,12 @@
|
|
MAX(t.inj_vol_cum) vol
|
|
MAX(t.inj_vol_cum) vol
|
|
FROM ( SELECT wm.well_id,
|
|
FROM ( SELECT wm.well_id,
|
|
TO_CHAR(wm.prod_date , 'YYYY年MM月') prod_time_str,
|
|
TO_CHAR(wm.prod_date , 'YYYY年MM月') prod_time_str,
|
|
- COALESCE(wm.gas_prod_cum, 0) gas_prod_mon,
|
|
|
|
- COALESCE(wm.oil_prod_cum, 0) oil_prod_mon,
|
|
|
|
- COALESCE(wm.water_prod_cum, 0) water_prod_mon,
|
|
|
|
- COALESCE(wm.liquid_prod_cum, 0) fluid_prod_mon,
|
|
|
|
|
|
+ COALESCE(wm.gas_prod_cum, 0)/100000000 gas_prod_mon,
|
|
|
|
+ COALESCE(wm.oil_prod_cum, 0)/10000 oil_prod_mon,
|
|
|
|
+ COALESCE(wm.water_prod_cum, 0)/10000 water_prod_mon,
|
|
|
|
+ COALESCE(wm.liquid_prod_cum, 0)/10000 fluid_prod_mon,
|
|
COALESCE(wm.water_cut, 0) water_cut,
|
|
COALESCE(wm.water_cut, 0) water_cut,
|
|
- COALESCE(wm.inj_vol_cum, 0) inj_vol_cum
|
|
|
|
|
|
+ COALESCE(wm.inj_vol_cum, 0)/10000 inj_vol_cum
|
|
FROM by_dwr.fact_dwr_pc_pro_well_vol_d wm
|
|
FROM by_dwr.fact_dwr_pc_pro_well_vol_d wm
|
|
WHERE wm.prod_date is not null
|
|
WHERE wm.prod_date is not null
|
|
and wm.prod_date <![CDATA[ >= ]]> to_date(#{startDay},'YYYY-MM-DD')
|
|
and wm.prod_date <![CDATA[ >= ]]> to_date(#{startDay},'YYYY-MM-DD')
|
|
@@ -84,11 +84,11 @@
|
|
FROM ( SELECT wm.well_id,
|
|
FROM ( SELECT wm.well_id,
|
|
to_char(to_date(CONCAT(wm.prod_date,'-01'), 'YYYY-MM-DD'), 'YYYY年MM月') prod_time_str,
|
|
to_char(to_date(CONCAT(wm.prod_date,'-01'), 'YYYY-MM-DD'), 'YYYY年MM月') prod_time_str,
|
|
COALESCE(wm.gas_prod_mon, 0) gas_prod_mon,
|
|
COALESCE(wm.gas_prod_mon, 0) gas_prod_mon,
|
|
- COALESCE(wm.oil_prod_mon, 0) oil_prod_mon,
|
|
|
|
- COALESCE(wm.water_prod_mon, 0) water_prod_mon,
|
|
|
|
- COALESCE(wm.fluid_prod_mon, 0) fluid_prod_mon,
|
|
|
|
|
|
+ COALESCE(wm.oil_prod_mon, 0)/10000 oil_prod_mon,
|
|
|
|
+ COALESCE(wm.water_prod_mon, 0)/10000 water_prod_mon,
|
|
|
|
+ COALESCE(wm.fluid_prod_mon, 0)/10000 fluid_prod_mon,
|
|
COALESCE(wm.water_cut_ratio_m, 0) water_cut_ratio_m,
|
|
COALESCE(wm.water_cut_ratio_m, 0) water_cut_ratio_m,
|
|
- COALESCE(wm.inj_vol_mon, 0) inj_vol_mon
|
|
|
|
|
|
+ COALESCE(wm.inj_vol_mon, 0)/10000 inj_vol_mon
|
|
FROM by_dwr.fact_dwr_pc_pro_well_vol_m wm
|
|
FROM by_dwr.fact_dwr_pc_pro_well_vol_m wm
|
|
WHERE wm.prod_date is not null
|
|
WHERE wm.prod_date is not null
|
|
and to_date(CONCAT(wm.prod_date,'-01'), 'YYYY-MM-DD') <![CDATA[ >= ]]> to_date(#{startDay},'YYYY-MM-DD')
|
|
and to_date(CONCAT(wm.prod_date,'-01'), 'YYYY-MM-DD') <![CDATA[ >= ]]> to_date(#{startDay},'YYYY-MM-DD')
|
|
@@ -112,11 +112,11 @@
|
|
FROM ( SELECT wm.well_id,
|
|
FROM ( SELECT wm.well_id,
|
|
SUBSTRING(prod_date, 1, 4) prod_time_str,
|
|
SUBSTRING(prod_date, 1, 4) prod_time_str,
|
|
COALESCE(wm.gas_prod_year, 0) gas_prod_year,
|
|
COALESCE(wm.gas_prod_year, 0) gas_prod_year,
|
|
- COALESCE(wm.oil_prod_year, 0) oil_prod_year,
|
|
|
|
- COALESCE(wm.water_prod_year, 0) water_prod_year,
|
|
|
|
- COALESCE(wm.liquid_prod_year, 0) fluid_prod_year,
|
|
|
|
|
|
+ COALESCE(wm.oil_prod_year, 0)/10000 oil_prod_year,
|
|
|
|
+ COALESCE(wm.water_prod_year, 0)/10000 water_prod_year,
|
|
|
|
+ COALESCE(wm.liquid_prod_year, 0)/10000 fluid_prod_year,
|
|
COALESCE(wm.water_cut_ratio_y, 0) water_cut_ratio_y,
|
|
COALESCE(wm.water_cut_ratio_y, 0) water_cut_ratio_y,
|
|
- COALESCE(wm.inj_vol_year, 0) inj_vol_year
|
|
|
|
|
|
+ COALESCE(wm.inj_vol_year, 0)/10000 inj_vol_year
|
|
FROM by_dwr.fact_dwr_pc_pro_well_vol_m wm
|
|
FROM by_dwr.fact_dwr_pc_pro_well_vol_m wm
|
|
WHERE wm.prod_date is not null
|
|
WHERE wm.prod_date is not null
|
|
and to_date(CONCAT(wm.prod_date,'-01'), 'YYYY-MM-DD') <![CDATA[ >= ]]> to_date(#{startDay},'YYYY-MM-DD')
|
|
and to_date(CONCAT(wm.prod_date,'-01'), 'YYYY-MM-DD') <![CDATA[ >= ]]> to_date(#{startDay},'YYYY-MM-DD')
|