Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Tables: department, dept_emp, dept_manager, employees, salaries, titles department (columns): dept_no, dept_name dept_emp (columns): emp_no, dept_no, from_date, to_date dept_manager (columns): emp_no, dept_no, from_date, to_date employees (columns):

Tables: department, dept_emp, dept_manager, employees, salaries, titles

department (columns): dept_no, dept_name

dept_emp (columns): emp_no, dept_no, from_date, to_date

dept_manager (columns): emp_no, dept_no, from_date, to_date

employees (columns): emp_no, birth_date, first_name, last_name, gender, hire_date

salaries (columns): emp_no, salary, from_date, to_date

titles (columns): emp_no, title, from_date, to_date

I need help with writing SQL queries for the questions below. The information about the tables in the SQL database are listed above.

1) What queries are needed for the following:

a) Steve Smith with birthday of 01/01/1980 just got hired. Please add him to the employee table.

b) Which department has the highest number of employees?

c) The person with highest pay in department number 1 just got fired. Please remove him/her from the employee table.

d) Do you see any person with undefined salary?

e) Create a table name Dependent. Choose your own set of attributes.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 11G SQL

Authors: Joan Casteel

2nd Edition

1133947360, 978-1133947363

More Books

Students also viewed these Databases questions