Hi,
I have to write an SQL Statement to retrieve some information, the following are the databases:
Lives (person-name, street, city)
Works (person-name, company-name, salary)
Located-in (company-name, city)
manages (person-name, manager-name)
Question 1: Find all employees who live in the same city as the company they work for.
Question 2: Find all employees who live in the same city and on the same street as their manager.
Question 3: Find all employees who earn more than every employee of Small Bank Corporation
I believe the statement for #3 is:
Select Person-name
From Work
Where Salary> (Select Salary
From Work
Where Salary = "Small Bank Corporation"
Thanks in advance for any help.
Segel
I have to write an SQL Statement to retrieve some information, the following are the databases:
Lives (person-name, street, city)
Works (person-name, company-name, salary)
Located-in (company-name, city)
manages (person-name, manager-name)
Question 1: Find all employees who live in the same city as the company they work for.
Question 2: Find all employees who live in the same city and on the same street as their manager.
Question 3: Find all employees who earn more than every employee of Small Bank Corporation
I believe the statement for #3 is:
Select Person-name
From Work
Where Salary> (Select Salary
From Work
Where Salary = "Small Bank Corporation"
Thanks in advance for any help.
Segel