Question: need albrega and SQL expression code for these, thank you Suppose we have following tables: employee (ename, city, state) - company (cname, city, state) -
Suppose we have following tables: employee (ename, city, state) - company (cname, city, state) - job (ename, cname, salary) Please write algebra expressions for following queries: 1. Find the names and cities of all employees who work for the PNC Bank. 2. Find the names, cities and states of all employees who work for PNC Bank and earn more than $100,000 per year. Assume each person works for at most one company. 3. Find the names of all employees who live in the same city as their companies. Next, please convert above algebra to SQL statement. Please save your 5QL code to Q2.sql for submission. Please note: This question can be done without real tables and data. But if you would like to test your SQL code, you can make up your own tables and data according to above table schema; Or you can also choose to use my demo database file using DB Browser
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
