Click to follow our Afritutor YouTube Channel, subscribe and click notifications and get updates on new learning videos
<=Back
f) A database called WorksOn has the following relations:
emp (eno, ename, bdate, title, salary, dno)
proj (pno, pname, budget, dno)
dept (dno, dname, mgreno)
workson (eno, pno, resp, hours)
i) Write an SQL query that returns the project number and name for projects with a
budget greater than $100,000.
ii) Write an SQL query that returns all works on records where hours worked is less than
10 and the responsibility is 'Manager'.
iii) 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. (1 mark)
iv) Write an SQL query that returns the employees (name only) in department 'D1'
ordered by decreasing salary. (1 mark)
v) Write an SQL query that returns the departments (all fields) ordered by ascending
department name. (0.5 marks)
vi) Write an SQL query that returns the employee name, department name, and employee
title. (0.5 marks)
vii) Write an SQL query that returns the project name, hours worked, and project number
for all works on records where hours > 10.
viii) Write an SQL query that returns the project name, department name, and budget for
all projects with a budget < $50,000.
ix) Write an SQL query that returns the employee numbers and salaries of all employees
in the 'Consulting' department ordered by descending salary.
x)Write an SQL query that returns the employee name, project name, employee title,
and hours for all works on records.
 Viewed: 72 times For Better experience and learning,for video answers, after video ends playing, click next question in the questions list!!!
Share in: