Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. select c.nombre as Comercializadora,
  2. m.idTarifa as id_tarifa, m.fecha as fecha,
  3. m.hora as hora,ROUND(sum(m.medida),3) as medida
  4.  
  5. from MedidasHorarias m
  6. LEFT JOIN Clientes c on c.id = m.idComercializadora
  7.  
  8. where m.idComercializadora = 8
  9.  
  10. group by m.idTarifa, m.fecha, m.hora
  11. having year(m.fecha) = "2016"
  12. and month(m.fecha) = "01"
  13. and m.idTarifa = 1
  14.  
  15. order by m.fecha,m.hora asc;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement