SQL Query Example
?
S
BashExample of a SQL Query
1SELECT
2 appointment_event_type.constant_name,
3 appointment.booking_reference
4FROM
5 appointment
6 LEFT JOIN appointment_event ON latest_appointment_event_id = appointment_event.id
7 LEFT JOIN appointment_event_type ON appointment_event_type.id = appointment_event.appointment_event_type_id
8WHERE
9 appointment.date BETWEEN "2019-08-01"
10 AND "2019-08-31"
11 and(appointment.appointment_cancellation_subreason_id NOT in(8, 10, 11, 30)
12 OR appointment.appointment_cancellation_subreason_id IS NULL) Created on 1/18/2021