Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Below tables represent part of the schema for a company database. The company has different branches in different cities. The city attribute shows the city
Below tables represent part of the schema for a company database. The company has different branches in different cities. The city attribute shows the city that a branch is located in several branches can be located in the same city CREATE TABLE branch (Id INT PRIMARY KEY City VARCHAR(255) NOT NULL): CREATE TABLE employee (Id INT PRIMARY KEY, Fname VARCHAR(255) NOT NULL Lname VARCHAR(255) NOT NULL Birth date DATE NOT NULL Salary DOUBLE NOT NULL Branch id INT NOT NULL FOREIGN (branch_id) REFERENCES branch(id)) engine = innodb Write a query that returns the maximum salary for each city. So you should return two columns, 'city' and 'salary'. The salary should be the highest employee salary among all branches in the city. There should be one row per city
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started