Find the staff name who has the maximum salary for each city.

Oracle 12c: SQL
3rd Edition
ISBN:9781305251038
Author:Joan Casteel
Publisher:Joan Casteel
Chapter1: Overview Of Database Concepts
Section: Chapter Questions
Problem 14MC: A unique identifier for a data row that consists of more than one field is commonly called...
icon
Related questions
Question

 Find the staff name who has the maximum salary for each city.

[MariaDB [dreamhome]> Select * from Staff;
| staffNo | fName | 1Name | position | sex
| SA9
Mary Howe
David Ford
Assistant | F
Supervisor
Assistant
Ann
Beech
Susan Brand
John
White
Julie | Lee
6 rows in set (0.001 sec)
[MariaDB [dreamhome]> Select * from Branch;
| city
SG14
SG37
SG5
SL21
SL41
+-
| branchNo | street
B002
B003
B004
B005
B007
Manager
Manager
Assistant
56 Cover Drive
163 Main Street
32 Manse Road
22 Deer Road
| 16 Argyll Street
5 rows in set (0.001 sec)
|
|
M
London
Glasgow
Bristol
London
| F
| F
| M
F
| DOB
salary
| 1970-02-19 | 9500.00
1958-03-24
| 1960-11-10 | 12000.00
|
18000.00
1940-06-03 | 24000.00
| postcode
| NW10 6EU |
G11 9QX
BS99 1NZ
SW1 4EH
Aberdeen | AB2 3SU
B003
| 1945-10-01 | 30000.00 B005
1965-06-13
9000.00
B005
| branchNo |
+
B007
B003
B003
+
Transcribed Image Text:[MariaDB [dreamhome]> Select * from Staff; | staffNo | fName | 1Name | position | sex | SA9 Mary Howe David Ford Assistant | F Supervisor Assistant Ann Beech Susan Brand John White Julie | Lee 6 rows in set (0.001 sec) [MariaDB [dreamhome]> Select * from Branch; | city SG14 SG37 SG5 SL21 SL41 +- | branchNo | street B002 B003 B004 B005 B007 Manager Manager Assistant 56 Cover Drive 163 Main Street 32 Manse Road 22 Deer Road | 16 Argyll Street 5 rows in set (0.001 sec) | | M London Glasgow Bristol London | F | F | M F | DOB salary | 1970-02-19 | 9500.00 1958-03-24 | 1960-11-10 | 12000.00 | 18000.00 1940-06-03 | 24000.00 | postcode | NW10 6EU | G11 9QX BS99 1NZ SW1 4EH Aberdeen | AB2 3SU B003 | 1945-10-01 | 30000.00 B005 1965-06-13 9000.00 B005 | branchNo | + B007 B003 B003 +
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Single 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
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
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