Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please fast Consider the following relational schema. ITEM (ItemName, ItemType, ItemColour) DEPARTMENT (Deptname, DeptFloor, DeptPhone, Manager) EMPLOYEE (EmpNo, EmpFname, EmpSalary, DeptName, SupervisedBy) SUPPLIER (SupNo, SupName)

image text in transcribedPlease fast

Consider the following relational schema. ITEM (ItemName, ItemType, ItemColour) DEPARTMENT (Deptname, DeptFloor, DeptPhone, Manager) EMPLOYEE (EmpNo, EmpFname, EmpSalary, DeptName, SupervisedBy) SUPPLIER (SupNo, SupName) SALE (SaleNo, SaleQty, ItemName, DeptName) DELIVERY (DeliNo, DeliQty, ItemName, DeptName, SupNo) Write the SQL statements for the following queries: a) Find the name of employees who works in the HR Department. [2 Marks] b) Count the number of employees in Marketing Department. [2 Marks] c) Find the supplier's name who supplies Maximum items. [2 Marks] d) For each department that sell item of type toys, find the average salary of the employee. [2 Marks] e) Find the name of items sold on first and second floor. [2 Marks]

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

Visual Basic6 Database Programming

Authors: John W. Fronckowiak, David J. Helda

1st Edition

ISBN: 0764532545, 978-0764532542

Students also viewed these Databases questions

Question

What factors will enhance and hinder flow experiences?

Answered: 1 week ago

Question

What are some of the possible scenes from our future?

Answered: 1 week ago