Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT sm.id,
- sm.denominacao,
- date_trunc('hour', m.data_medicao) as medicao,
- SUM(m.potencia_ativa) as potencia_ativa,
- SUM(m.potencia_reativa) as potencia_reativa
- from sideufg_medicao m
- INNER JOIN sideufg_medidor sm on sm.id = m.medidor_id
- WHERE sm.id IN
- (2023001, 2037001, 1093001, 1094001, 1095001, 1096001, 1097001, 1098001, 1099001, 1100001, 1101001, 1102001)
- GROUP BY 3, sm.id
- ORDER BY 3;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement