SQL is a programming language used by database developers to query data. You are required to write the SQL code when answering the following questions. Patient table PATIENTNUM NAME SURNAME APPOINTMENTDATE APPOINTMENTTIME SURGEONID W220 TONY JONES 12 JUNE 2016 10:00 S10011 W223 TSHEPO МОKENA 01 JULY 2016 09:00 S10011 W225 PERCY МАСKNA 12 JULY 2016 15:00 S10036 W224 JIMMY TAU 12 AUGUST 2016 14:00 S11006 Surgeon table SURGEONID NAME AGE SALARY S10011 ANA 35 12050 S10025 ANTONIO 45 90000 S10036 MARK 33 38000 S11006 МСCAIN 42 32500 Q.6.1 Write a SQL statement to create a Surgeon table. Q.6.2 Write a SQL statement that will display patient's name, appointment date and the appointment time and sorts only the column 'name' in ascending order. Q.6.3 Write a SQL statement that will display all surgeons that have salary less than 35000

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter11: Sql Server Databases
Section: Chapter Questions
Problem 10E
icon
Related questions
Question

Please answer from question 6.4 as the ones before were answered previously. Thank you

SQL is a programming language used by database developers to query data. You are required to write
the SQL code when answering the following questions.
Patient table
PATIENTNUM
NAME
SURNAME
APPOINTMENTDATE
APPOINTMENTTIME
SURGEONID
W220
TONY
JONES
12 JUNE 2016
10:00
S10011
W223
TSHEPO
МОKENA
01 JULY 2016
09:00
S10011
W225
PERCY
MACKNA
12 JULY 2016
15:00
S10036
W224
JIMMY
TAU
12 AUGUST 2016
14:00
S11006
Surgeon table
SURGEONID
NAME
AGE
SALARY
S10011
ANA
35
12050
S10025
ANTONIO
45
90000
S10036
MARK
38000
S11006
МССAIN
42
32500
Q.6.1
Write a SQL statement to create a Surgeon table.
Q.6.2
Write a SQL statement that will display patient's name, appointment date and the
appointment time and sorts only the column 'name' in ascending order.
Q.6.3
Write a SQL statement that will display all surgeons that have salary less than 35000
Q.6.4
You are required to delete a patient Tshepo Mokena using a relevant SQL statement
Q.6.5
Write a SQL statement to count how many patients have booked appoints in total?
Q.6.6
Write a SQL statement that will selects all patients with surnames that ends with the
letter "A".
Q.6.7
Add a new row in the Patient table with the following details
W221, MALCOL, MOYO, 16 JULY, 12:00, S10011
Q.6.8
Write a query that will display the oldest surgeon. In your query display the following
fields, name and age
Q.6.9
Write a query that determine the sum salary for all the surgeons.
Q.6.10 Write an SQL statement that can be used to display name, age, and a new field called
new salary showing a 15% increase in the salary. Display only those names where the
percentage increase in new salary is greater than 40000.
Transcribed Image Text:SQL is a programming language used by database developers to query data. You are required to write the SQL code when answering the following questions. Patient table PATIENTNUM NAME SURNAME APPOINTMENTDATE APPOINTMENTTIME SURGEONID W220 TONY JONES 12 JUNE 2016 10:00 S10011 W223 TSHEPO МОKENA 01 JULY 2016 09:00 S10011 W225 PERCY MACKNA 12 JULY 2016 15:00 S10036 W224 JIMMY TAU 12 AUGUST 2016 14:00 S11006 Surgeon table SURGEONID NAME AGE SALARY S10011 ANA 35 12050 S10025 ANTONIO 45 90000 S10036 MARK 38000 S11006 МССAIN 42 32500 Q.6.1 Write a SQL statement to create a Surgeon table. Q.6.2 Write a SQL statement that will display patient's name, appointment date and the appointment time and sorts only the column 'name' in ascending order. Q.6.3 Write a SQL statement that will display all surgeons that have salary less than 35000 Q.6.4 You are required to delete a patient Tshepo Mokena using a relevant SQL statement Q.6.5 Write a SQL statement to count how many patients have booked appoints in total? Q.6.6 Write a SQL statement that will selects all patients with surnames that ends with the letter "A". Q.6.7 Add a new row in the Patient table with the following details W221, MALCOL, MOYO, 16 JULY, 12:00, S10011 Q.6.8 Write a query that will display the oldest surgeon. In your query display the following fields, name and age Q.6.9 Write a query that determine the sum salary for all the surgeons. Q.6.10 Write an SQL statement that can be used to display name, age, and a new field called new salary showing a 15% increase in the salary. Display only those names where the percentage increase in new salary is greater than 40000.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps

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
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Enhanced Discovering Computers 2017 (Shelly Cashm…
Enhanced Discovering Computers 2017 (Shelly Cashm…
Computer Science
ISBN:
9781305657458
Author:
Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. Campbell
Publisher:
Cengage Learning