Ver Mensaje Individual
  #4 (permalink)  
Antiguo 30/08/2015, 13:37
Avatar de Libras
Libras
Colaborador
 
Fecha de Ingreso: agosto-2006
Ubicación: En la hermosa perla de occidente
Mensajes: 7.412
Antigüedad: 17 años, 8 meses
Puntos: 774
Respuesta: Número de consultas total de hoy por hotel

1 tabla
-----
Código SQL:
Ver original
  1. SELECT COUNT(*) FROM tabla1 AS t1
  2. WHERE tabla1.fecha BETWEEN fecha_inicial AND fecha_final

3 tablas

Código SQL:
Ver original
  1. SELECT COUNT(*) FROM tabla1 AS t1
  2. LEFT JOIN tabla2 AS t2 ON (t1.id=t2.id)
  3. LEFT JOIN tabla3 AS t3 ON (t1.id=t3.id)
  4. WHERE tabla1.fecha BETWEEN fecha_inicial AND fecha_final
__________________
What does an execution plan say to t-sql query? Go f**k yourself, if you are not happy with me