0% found this document useful (0 votes)
31 views1 page

Course Work

The document provides instructions to create a database with tables for employees, projects, departments, and works on records. It then lists 10 questions to write SQL queries against the database tables, including queries to return project details, works on records, employee details based on title, salary, and department, and queries to return and order results by project name, department name, employee name, and salary.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views1 page

Course Work

The document provides instructions to create a database with tables for employees, projects, departments, and works on records. It then lists 10 questions to write SQL queries against the database tables, including queries to return project details, works on records, employee details based on title, salary, and department, and queries to return and order results by project name, department name, employee name, and salary.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

WEB INFONET INSTITUTE OF TECHNOLOGY

Course Work For Database Languages

Create The following Database and attempt the questions that follow:

emp (eno, ename, bdate, title, salary,


dno) proj (pno, pname, budget, dno) dept
(dno, dname, mgreno) workson (eno, pno,
resp, hours)

Questions:
1) Write an SQL query that returns the project number and name for projects with a
budget greater than $100,000.

2) Write an SQL query that returns all works on records where hours worked is less than
10 and the responsibility is 'Manager'.

3) Write an SQL query that returns the employees (number and name only) who have a
title of 'EE' or 'SA' and make more than $35,000.

4) Write an SQL query that returns the employees (name only) in department 'D1'
ordered by decreasing salary.

5) Write an SQL query that returns the departments (all fields) ordered by ascending
department name.

6) Write an SQL query that returns the employee’s name, department name, and
employee title.

7) Write an SQL query that returns the project name, hours worked, and project number
for all works on records where hours > 10.

8) Write an SQL query that returns the project name, department name, and budget for
all projects with a budget < $50,000.

9) Write an SQL query that returns the employee numbers and salaries of all employees
in the 'Consulting' department ordered by descending salary.

10) Write an SQL query that returns the employee’s name, project name, employee title,
and hours for all works on records.

Everything that lives, starts in our minds ~ Nicholas Loren

You might also like