Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

/ * These tasks are done in court database, which you can download from Moodle. Write you SQL code right after each task. You must

/*
These tasks are done in "court" database, which you can download from Moodle.
Write you SQL code right after each task.
You must use the type of SQL command that is demanded. For example, using joins instead of subqueries
when subquery is expected, gives 0 point.
Each task gives you 1 point, 7 points total.
*/
-- Task 1(Use Subqueries): Find the names of employees (first_name, last_name) who work in the 'IT' department.
-- Your SQL here
-- Task 2(Use Subqueries): List the projects (project_name) located in the same city as the 'IT' department.
-- Your SQL here
-- Task 3(Use Subqueries): Find the projects (project_name) with more than 300 total hours worked by employees.
-- Your SQL here
-- Task 4: (Use Subqueries) List the employees (first_name, last_name) who have the highest salary within their department.
-- Your SQL here
-- Task 5(Use Subqueries): Find all persons who have worked on at least one project located in HELSINKI.
-- Your SQL here
-- Task 6(Use Window Function): Calculate the average tax rate for employees who have a degree ('BA','MSc', or 'PhD').
-- Your SQL here
-- Task 7(Use Window Function): Rank employees by salary within each department
-- Your SQL here

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

Step: 3

blur-text-image

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

Modern Database Management

Authors: Heikki Topi, Jeffrey A Hoffer, Ramesh Venkataraman

13th Edition

0134773659, 978-0134773650

More Books

Students also viewed these Databases questions