Untitled

 avatar
unknown
plain_text
18 days ago
1.8 kB
6
Indexable
Value.NativeQuery(PostgreSQL.Database("pgpaas-powerhub-prod-001.postgres.database.azure.com", "ulpodspg001", [HierarchicalNavigation=true]), "select#(lf)    bm_unit as ""BM Unit"",#(lf)    settlement_day as ""Settlement Day"",#(lf)    period as ""Settlement Period"",#(lf)    sum(coalesce(fpn, 0)) as ""FPN"",#(lf)    sum(coalesce(fpn, 0) + (coalesce(abv, 0) * 2) + (coalesce(aov, 0) * 2)) as ""QME"",#(lf)    sum(coalesce(abv, 0)) as ""ABV"",#(lf)    sum(coalesce(aov, 0)) as ""AOV""#(lf)from bo_user_uniper.mi_bmu_prd#(lf)where bm_unit in ( 'E_BRGG-1','E_BRYP-1','E_CORB-1','E_KLYN-A-1','E_PETEM1','E_ROOS-1','E_SHOS-1','T_BAGE-1','T_BARK-1','T_BARKB2',#(lf)                   'T_CDCL-1','T_CNQPS-1','T_CNQPS-2','T_CNQPS-3','T_CNQPS-4','T_COSO-1','T_DAMC-1','T_DEEP-1','T_DIDCB5','T_DIDCB6',#(lf)                   'T_EECL-1','T_GRAI-6','T_GRAI-7','T_GRAI-8','T_HUMR-1','T_KEAD-1','T_KILLPG-1','T_KILLPG-2','T_KILNS-1','T_LAGA-1','T_LBAR-1',#(lf)                   'T_MEDP-1','T_MRWD-1','T_PEHE-1','T_PEHE-2','T_PEMB-11','T_PEMB-21','T_PEMB-31','T_PEMB-41','T_PEMB-51','T_ROCK-1','T_RYHPS-1',#(lf)                   'T_SCCL-1','T_SCCL-2','T_SCCL-3','T_SEAB-1','T_SEAB-2','T_SHBA-1','T_SHBA-2','T_SPLN-1','T_STAY-1','T_STAY-2','T_STAY-3','T_STAY-4',#(lf)                   'T_SUTB-1','T_SVRP-10','T_SVRP-20','T_TESI-1','T_TESI-2','T_WBURB-1','T_WBURB-2','T_WBURB-3')#(lf)and settlement_day between to_timestamp('01-01-2023 00:00:00','dd-mm-yyyy hh24:mi:ss')::timestamp and current_timestamp::timestamp --and settlement_day between date '2021-10-01' and date '2021-10-04'#(lf)--and settlement_day between date '2021-01-01' and date '2021-01-31'#(lf)group by bm_unit, settlement_day, period#(lf)order by bm_unit, settlement_day, period", null, [EnableFolding=true])
Editor is loading...
Leave a Comment