00:02
We're going to go through a series of queries, questions on queries, and write them out.
00:10
The first problem is retrieve the names of all employees who work more than 10 hours per week on the product x project.
00:21
So we're going to select first name, last name from employee e.
00:26
We're going to join that with the works on table.
00:31
Give that a shortcut of w.
00:34
We're going to join on social security number.
00:38
We're going to join on project, on project number, and we're going to check where department number is 5 and the product name is product x and ours is greater than 10.
00:59
And that's our query for problem a.
01:03
Problem b lists the names of all employees who have a dependent with the first name as themselves.
01:10
So we'll select distinct first name, last name from employees.
01:16
We're going to join that with our dependent table on social security number where employee first name equals dependent name.
01:29
Problem c.
01:32
Find the names of all employees who are directly supervised by franklin wong.
01:36
That's an easy one.
01:39
Select name from employee.
01:42
Join employee.
01:45
Name is franklin wong...