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

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education