(a) Add the following record into the SALESPERSON table. SALES_NAME POSITION AREA JOYCE SENIOR MELAKA (b) Show how all junior salesperson can be removed from SALESPERSON. (c) Change Lily's position as she has been promoted from junior to senior level.

A Guide to SQL
9th Edition
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Philip J. Pratt
Chapter8: Sql Functions And Procedures
Section: Chapter Questions
Problem 9TD
icon
Related questions
Question
Based on the following tables, write appropriate SQL statements to carry out the following
tasks:
CLIENT
CLIENT_NAME
LOCATION
SAM LEE
MELAKA
LEE MEI TENG
PENANG
ΚΙΚΟ ΤΑΝ
KL
ADAM ALI
KL
EVA KUMAR
MELAKA
SALESPERSON
SALES_NAME
POSITION
AREA
JAMES ANG
JUNIOR
MELAKA
MARCUS TEO
SENIOR
PENANG
LILY TAY
JUNIOR
KL
(a) Add the following record into the SALESPERSON table.
SALES_NAME
POSITION
AREA
JOYCE
SENIOR
MELAKA
(b) Show how all junior salesperson can be removed from SALESPERSON.
(c) Change Lily's position as she has been promoted from junior to senior level.
(d) Retrieve all clients who are located in Melaka. Sort the result in ascending order by
location.
(e) Display the number of clients in each location.
(f) Display those clients with the surname “Lee".
(g) List the salesperson name and position for all senior salesperson from Penang.
(h) List the salesperson and client names who are located in the same area.
Transcribed Image Text:Based on the following tables, write appropriate SQL statements to carry out the following tasks: CLIENT CLIENT_NAME LOCATION SAM LEE MELAKA LEE MEI TENG PENANG ΚΙΚΟ ΤΑΝ KL ADAM ALI KL EVA KUMAR MELAKA SALESPERSON SALES_NAME POSITION AREA JAMES ANG JUNIOR MELAKA MARCUS TEO SENIOR PENANG LILY TAY JUNIOR KL (a) Add the following record into the SALESPERSON table. SALES_NAME POSITION AREA JOYCE SENIOR MELAKA (b) Show how all junior salesperson can be removed from SALESPERSON. (c) Change Lily's position as she has been promoted from junior to senior level. (d) Retrieve all clients who are located in Melaka. Sort the result in ascending order by location. (e) Display the number of clients in each location. (f) Display those clients with the surname “Lee". (g) List the salesperson name and position for all senior salesperson from Penang. (h) List the salesperson and client names who are located in the same area.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
SQL Query
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
Recommended textbooks for you
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781285196145
Author:
Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning