Staff Current Availability Query
This query demonstrates joins, subqueries, grouping, formatting, the WHERE clause, and the HAVING clause. Syntax is based on Cache database.
The purpose of the data was to show employees which staff are available if a client comes in without an appointment. In addition to showing the staff who are working today in specific departments, and do not have an appointment at the current time, I wanted to show the staff’s next immediate appointment in the future.
I used two queries for this project because they were to be used in a Coldfusion application that can easily merge the two sets of data, mimicking a single query on output.