4. Create the following TEN queries: (read the following Project Submission Requirements’ file no 3 part carefully about the submission process for this section) 1) Create a query that returns Patients’ full names, addresses, phone numbers and email addresses. (Ten results minimum). 2) Create a query that lists all patients who have not had any appointment in the clinic in the last 2 years (at least one patient) 3) Create a query that returns the all appointment by a particular patient in the year of 2020 (should return 5 appointments at least) the result set would include patient names, examining doctors’ and nurses’ names, dates and times of the appointments, any tests ordered by the doctors for the patient.
SQL
SQL stands for Structured Query Language, is a form of communication that uses queries structured in a specific format to store, manage & retrieve data from a relational database.
Queries
A query is a type of computer programming language that is used to retrieve data from a database. Databases are useful in a variety of ways. They enable the retrieval of records or parts of records, as well as the performance of various calculations prior to displaying the results. A search query is one type of query that many people perform several times per day. A search query is executed every time you use a search engine to find something. When you press the Enter key, the keywords are sent to the search engine, where they are processed by an algorithm that retrieves related results from the search index. Your query's results are displayed on a search engine results page, or SER.
4. Create the following TEN queries: (read the following Project Submission
Requirements’ file no 3 part carefully about the submission process for this
section)
1) Create a query that returns Patients’ full names, addresses, phone
numbers and email addresses. (Ten results minimum).
2) Create a query that lists all patients who have not had any appointment
in the clinic in the last 2 years (at least one patient)
3) Create a query that returns the all appointment by a particular patient in
the year of 2020 (should return 5 appointments at least) the result set
would include patient names, examining doctors’ and nurses’ names,
dates and times of the appointments, any tests ordered by the doctors
for the patient.
4) Create a query that returns all appointments that were either cancelled,
or patients were No Show in the month of December 2020. (five results
minimum)
5) Create a query that that returns staff members’ names (excluding
doctors), their hourly rates, number of hours worked and Salary
(calculated column; there are 13 employees in the clinic) for the two
weeks period (
6) The Clinic Manager has decided to send “Happy holidays” greeting cards
in December and needs the full names and complete addresses (street
address, city, province, Postal Code) for all human beings who are part of
the clinic (Doctors, nurses, patients, secretaries etc) so create a query that
returns this information (usually called a mailing label)
7) Create a query that returns all patients enrolled permanently with one of
the doctors
8) Create a query that returns a list of all patients and their family member
(add a column primary member id in the patient table; make one patient
as the primary member and then create another column called
relationship and add husband, wife, son, daughter etc.)
9) Create a query that would create a list of all patients that were seen by a
particular doctor on a given date (i.e. 12 December, 2020)
10) Create a query that would return name of a patient who paid some
sort of a fee to the clinic, also retrieve the service for which he paid and
the doctor’s name (for example Dr Smith, Sick Note)
Trending now
This is a popular solution!
Step by step
Solved in 3 steps
Create a query that that returns staff members’ names (excluding
doctors), their hourly rates, number of hours worked and Salary
(calculated column; there are 13 employees in the clinic) for the two
weeks period
Create a query that returns all patients enrolled permanently with one of
the doctors
Create a query that would create a list of all patients that were seen by a
particular doctor on a given date (i.e. 12 December, 2020)
What answer for this two?
4) Create a query that returns all appointments that were either cancelled,
or patients were No Show in the month of December 2020. (five results
minimum)
8) Create a query that returns a list of all patients and their family member
(add a column primary member id in the patient table; make one patient
as the primary member and then create another column called
relationship and add husband, wife, son, daughter etc.)