CityU_Data Engineering Tutorial 2

Using relational operators, specify the following queries on the COMPANY relational database schema shown below.

1. Retrieve the name (Fname, Lname) and address (Address) of all employees who work for the ‘Research’ department.

 

2. List all employee names (Fname, Lname) and the name of the departments (Dname) they manage, if any.

3. For every project located in ‘Stafford’, list the project number (Pnumber), the controlling department number (Dnum), and the department manager’s last name (Lname), address (Address) and birth date (Bdate).

4. Retrieve the names (Lname and Fname) of employees in department 5 who work more than 10 hours per week on the 'ProductX' project.

5. Make a list of all project numbers (Pnumber) for projects that involve an employee whose last name is ‘Smith’, either as a worker or as a manager of the department that controls the project.

6. Retrieve each department number (Dnumber), the number of employees in the department, and their average salary.

7.List the names (Lname and Fname) of all employees with two or more dependents.

8.Retrieve the names (Lname and Fname) of employees who have no dependents.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值