Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select c.nombre as Comercializadora,
- m.idTarifa as id_tarifa, m.fecha as fecha,
- m.hora as hora,ROUND(sum(m.medida),3) as medida
- from MedidasHorarias m
- LEFT JOIN Clientes c on c.id = m.idComercializadora
- where m.idComercializadora = 8
- group by m.idTarifa, m.fecha, m.hora
- having year(m.fecha) = "2016"
- and month(m.fecha) = "01"
- and m.idTarifa = 1
- order by m.fecha,m.hora asc;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement