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
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
New Perspectives on HTML5, CSS3, and JavaScript
6th Edition
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Patrick M. Carey
Chapter3: Designing A Page Layout: Creating A Website For A Chocolatier
Section3.2: Visual Overview: Page Layout Grids
Problem 6QC
Related questions
Question
100%
![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](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F57392e18-b049-4aca-9ce1-33792bf177e4%2F96090b78-be90-4d5f-b575-0bf1e9c220d2%2Fy2jr9nl_processed.png&w=3840&q=75)
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
![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](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F57392e18-b049-4aca-9ce1-33792bf177e4%2F96090b78-be90-4d5f-b575-0bf1e9c220d2%2Fk66lypi_processed.png&w=3840&q=75)
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
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
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.Recommended textbooks for you
![New Perspectives on HTML5, CSS3, and JavaScript](https://www.bartleby.com/isbn_cover_images/9781305503922/9781305503922_smallCoverImage.gif)
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning
![New Perspectives on HTML5, CSS3, and JavaScript](https://www.bartleby.com/isbn_cover_images/9781305503922/9781305503922_smallCoverImage.gif)
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning