Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Suppose that there are three tables, Person, WorkFor, and Company, in a database. o The Person table stores information about the ID, name, street,
Suppose that there are three tables, Person, WorkFor, and Company, in a database. o The Person table stores information about the ID, name, street, and city of each employee. o The Company table stores information about the tax number, name, and city of each company. A company may have several branches located in different cities. In this case, each branch of this company has its own tax number. (a) (b) (d) o The WorkFor table stores information about the ID and salary of each employee, and the tax number of each company. Write the data definition language (DDL) to create these three tables. (c) Write a SQL statement to calculate the number of employees who live in the city Uppsala. Write a SQL statement to find the names of all the employees who live in the city Stockholm. (1) Write a SQL statement to find the ID numbers of all the employees who work for the company IKEA and earn more than 35000. (e) Write a SQL statement to update the records in the WorkFor table, to double the salary of each employee whose salary is currently below 10000. Write a SQL statement to find the names of all the employees who work for companies which have branches located in the cities Stockholm or Uppsala.
Step by Step Solution
★★★★★
3.36 Rating (149 Votes )
There are 3 Steps involved in it
Step: 1
Answer Here is the DDL for creating the three tables Person WorkFor and Company Create the Person ta...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