Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created September 5, 2019 22:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/8f468f53396947363068cd89ad82ff4e to your computer and use it in GitHub Desktop.
Save parzibyte/8f468f53396947363068cd89ad82ff4e to your computer and use it in GitHub Desktop.
select turnos.numero, profesionales.nombre from turnos
inner join profesionales
on turnos.id_profesional = profesionales.id
and turnos.id_profesional is not null
and turnos.estado = 'ESPERANDO'
and turnos.fecha = ?
group by profesionales.id, turnos.numero, profesionales.nombre
order by hora asc
limit 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment