Write the SQL commands based on the tables given below. a)Display the list of Patientscontaining PatientName, PatientContactand PatientEmailwith Patient’s name begin with ‘S’. b)Display the AppointmentDate, AppointmentTime, PatientName and DentistNamefor all appointmentsin month ofSeptember. c)Add a new attribute called Statusin the Appointments table. The length is 20 characters the default value is ‘Active’.

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

Write the SQL commands based on the tables given below.

a)Display the list of Patientscontaining PatientName, PatientContactand PatientEmailwith Patient’s name begin with ‘S’.

b)Display the AppointmentDate, AppointmentTime, PatientName and DentistNamefor all appointmentsin month ofSeptember.

c)Add a new attribute called Statusin the Appointments table. The length is 20 characters the default value is ‘Active’.

d)Display the Patient Name and the total number of appointments for every patientso farand sort according to the patient’s name.

e)Display how much Dentist called Faezahhave charged for the patients’ treatments so far.

f)Display the cheapest treatment price.

g)Azmi require another follow up appointment for teeth cleaning. Create an SQL statement to add the appointment. The appointment should on the 5thDecember 2021and the time should be the same time for the previous appointment and attended by the same doctor.

h)Display all patients that have been treated by ‘Filling and Repairs’ and ‘Teeth Cleaning’.Use the IN keyword in your answer.

i)Shahir need to reschedule to appointment from 7thSeptember to 9thSeptember. Create an SQL statement to change the appointment.

Dentists
DentistID
D1
D2
D3
DentistName
Faiz
Umar
Faizah
Sarah
Suhaimi
DentistEmail
faiz@gmail.com
lumar@gmail.com
faizah@gmail.com
sarah@gmail.com
suhaimi@gmail.com
D4
DS
Treatments
TreatiD
TreatType
Fillings and Repairs
Gum Surgery
Tooth Decay
Teeth Cleaning
Wisdom Teeth Removal
Price
F1
50
200
70
G1
T1
T2
15
300
wi
Patients
El
E2
E3
E4
PatientiD PatientName PatientContact
Sakinah
Liyana
Alla
Shahir
Azmi
012-4567887
011-3457855
013-4572810
012-4573271
PatlentEmail
sakinaho1gmall.com
liyana17@gmail.com
alla18@gmail.com
shahiros03@gmail.com
azmıgemail.com
ES
013-7588374
Appointments
AppoinmentDate TreatmentiD DentistiD
2021-06-05 F1
2021-06-09 G1
2021-09-05 F1
AppoinmentiD
PatientiD
AppoinmentTime
12:30
D2
2E2
3E3
4 E4
5E5
6 E3
1:00
8:00
D3
03
9:00
8:00
4:00
2021-09-07 T2
2021-11-18 T1
2021-12-01 w1
05
D4
D1
wil ui
Transcribed Image Text:Dentists DentistID D1 D2 D3 DentistName Faiz Umar Faizah Sarah Suhaimi DentistEmail faiz@gmail.com lumar@gmail.com faizah@gmail.com sarah@gmail.com suhaimi@gmail.com D4 DS Treatments TreatiD TreatType Fillings and Repairs Gum Surgery Tooth Decay Teeth Cleaning Wisdom Teeth Removal Price F1 50 200 70 G1 T1 T2 15 300 wi Patients El E2 E3 E4 PatientiD PatientName PatientContact Sakinah Liyana Alla Shahir Azmi 012-4567887 011-3457855 013-4572810 012-4573271 PatlentEmail sakinaho1gmall.com liyana17@gmail.com alla18@gmail.com shahiros03@gmail.com azmıgemail.com ES 013-7588374 Appointments AppoinmentDate TreatmentiD DentistiD 2021-06-05 F1 2021-06-09 G1 2021-09-05 F1 AppoinmentiD PatientiD AppoinmentTime 12:30 D2 2E2 3E3 4 E4 5E5 6 E3 1:00 8:00 D3 03 9:00 8:00 4:00 2021-09-07 T2 2021-11-18 T1 2021-12-01 w1 05 D4 D1 wil ui
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Multiple 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