Write the SQL commands based on the tables given. 1) Display the list of Patients containing PatientName, PatientContactand PatientEmailwith Patient's name ending with 'a', 2) Display the AppointmentDate, AppointmentTime, PatientName and DentistName for all appointments in month of September. 3) Add a new attribute called Status in the Appointments table. The length is 20 characters the default value is 'Active'. 4) Display the Patient Name and the total number of appointments for every patient so far and sort according to the patient's name. 5) Display how much Dentist called David have charged for the patients' treatments so far. 6) Display the cheapest treatment price. 7)Anthony require another follow up appointment for teeth eleaning. Create an SQL statement to add the appointment. The appointment should on the 6thDecember 2021and the time should be the same time for the previous appointment and attended by the same doctor

Principles of Information Systems (MindTap Course List)
13th Edition
ISBN:9781305971776
Author:Ralph Stair, George Reynolds
Publisher:Ralph Stair, George Reynolds
Chapter1: An Introduction To Information Systems
Section: Chapter Questions
Problem 1WE
icon
Related questions
Question
100%

Answer Question 4 to 7

Dentist
DentistID
DentistName
DentistEmail
james
james@yahoo.com
robert@yahoo.com
david@yahoo.com
richard@yahoo.com
D1
D2
robert
D3
david
D4
richard
D5
thomas
thosmas@yahoo.com
Treatments
TreatID
TreatType
Fillings & Repair
Price
F1
50
G1
Gum Surgery
200
T1
Tooth Decay
80
T2
Teeth Cleaning
15
W1
Wisdom Teeth Removal
300
Patients
PatientID
PatientName
PatientContact
PatientEmail
16505130042 joseph@yahoo.com
16505135321 charles@yahoo.com
16505137728 daniel@yahoo.com
P1
joseph
P2
charles
P3
daniel
P4
matthew
16505133211 matthew@yahoo.com
P5
anthony
16505139214 anthony@yahoo.com
Transcribed Image Text:Dentist DentistID DentistName DentistEmail james james@yahoo.com robert@yahoo.com david@yahoo.com richard@yahoo.com D1 D2 robert D3 david D4 richard D5 thomas thosmas@yahoo.com Treatments TreatID TreatType Fillings & Repair Price F1 50 G1 Gum Surgery 200 T1 Tooth Decay 80 T2 Teeth Cleaning 15 W1 Wisdom Teeth Removal 300 Patients PatientID PatientName PatientContact PatientEmail 16505130042 joseph@yahoo.com 16505135321 charles@yahoo.com 16505137728 daniel@yahoo.com P1 joseph P2 charles P3 daniel P4 matthew 16505133211 matthew@yahoo.com P5 anthony 16505139214 anthony@yahoo.com
Appointments
AppointmentID
1 P1
2 P2
PatientID
AppointmentTime
AppointmentDate
TreatmentID
DentistID
6/6/2021 F1
9/8/2021 G1
5/9/2021 F1
12:30
D2
1:00
D3
P3
8:00
D3
4
P4
9:00
7/9/2021 T2
D5
5 P5
8:00
18/11/2021 T1
D4
6 P3
4:00
1/12/2021 w1
D1
Write the SQL commands based on the tables given.
1) Display the list of Patients containing PatientName, PatientContactand PatientEmailwith Patient's name ending with 'a'.
2) Display the AppointmentDate, AppointmentTime, PatientName and DentistName for all appointments in month of September.
3) Add a new attribute called Status in the Appointments table. The length is 20 characters the default value is 'Active'.
4) Display the Patient Name and the total number of appointments for every patient so far and sort according to the patient's name.
5) Display how much Dentist called David have charged for the patients' treatments so far.
6) Display the cheapest treatment price.
7)Anthony require another follow up appointment for tecth cleaning. Create an SQL statement to add the appointment. The appointment should
on the 6thDecember 2021and the time should be the same time for the previous appointment and attended by the same doctor
88
Transcribed Image Text:Appointments AppointmentID 1 P1 2 P2 PatientID AppointmentTime AppointmentDate TreatmentID DentistID 6/6/2021 F1 9/8/2021 G1 5/9/2021 F1 12:30 D2 1:00 D3 P3 8:00 D3 4 P4 9:00 7/9/2021 T2 D5 5 P5 8:00 18/11/2021 T1 D4 6 P3 4:00 1/12/2021 w1 D1 Write the SQL commands based on the tables given. 1) Display the list of Patients containing PatientName, PatientContactand PatientEmailwith Patient's name ending with 'a'. 2) Display the AppointmentDate, AppointmentTime, PatientName and DentistName for all appointments in month of September. 3) Add a new attribute called Status in the Appointments table. The length is 20 characters the default value is 'Active'. 4) Display the Patient Name and the total number of appointments for every patient so far and sort according to the patient's name. 5) Display how much Dentist called David have charged for the patients' treatments so far. 6) Display the cheapest treatment price. 7)Anthony require another follow up appointment for tecth cleaning. Create an SQL statement to add the appointment. The appointment should on the 6thDecember 2021and the time should be the same time for the previous appointment and attended by the same doctor 88
Expert Solution
steps

Step by step

Solved in 5 steps with 8 images

Blurred answer
Knowledge Booster
Table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Principles of Information Systems (MindTap Course…
Principles of Information Systems (MindTap Course…
Computer Science
ISBN:
9781305971776
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning