|
@@ -79,7 +79,7 @@ def getkwh(datestart, dateend, timestart, timeend, subset):
|
79
|
79
|
SELECT read_time
|
80
|
80
|
FROM GENERATE_SERIES(%(tsstart)s::timestamp, %(tsend)s::timestamp,
|
81
|
81
|
'30 minutes'::interval) read_time
|
82
|
|
- ) AS tsdata CROSS JOIN public.icp_sample
|
|
82
|
+ ) AS tsdata CROSS JOIN public.best_icp
|
83
|
83
|
) AS comb
|
84
|
84
|
LEFT JOIN
|
85
|
85
|
(
|
|
@@ -97,7 +97,7 @@ def getkwh(datestart, dateend, timestart, timeend, subset):
|
97
|
97
|
and a.read_date < to_date(%(dateend)s,'yyyy-mm-dd')
|
98
|
98
|
and a.content_code ~ ('UN|CN|EG')
|
99
|
99
|
AND a.icp_id IN (
|
100
|
|
- SELECT icp_id FROM public.icp_sample
|
|
100
|
+ SELECT icp_id FROM public.best_icp
|
101
|
101
|
)
|
102
|
102
|
GROUP BY 1, 2, 3
|
103
|
103
|
) AS coup_tall
|