ITC 222 Joins

Description

For this assignment you answer questions that require the joining of two or more tables.

To Do

Develop the SQL that answers the following questions

1. You want the first and last name of each tenant with their lease number and the startDate of their lease. Use Join syntax.

2. Do the same as 1. but with equi-join syntax.

3. You want to see who has paid the rent this april. Get the tenant's last name, the apartment number the monthly rent and the amount paid. Use inner join syntax

4. Do the same again with equi join syntax.

5. Has there been anyone who paid less than was due for rent? This is over the entire rent history. Use inner join syntax

6. Get all the tenants' roomates, get the tenant first and last name, their lease number and the first and last names of the roomates. Use Inner Join syntax

7. Get the names, apartment numbers and phone numbers of every tenant that has an outstanding maintenance request

8. What is the total rent amount paid by Adison? return the lastname, ApartmentNumber and total

Use an outer join to do these next two questions

9. What apartments have never been rented?

10. What tenants do not have roomates?

11. Do a cross join between Apartments and Tenants, use lastname and apartment number. Use join syntax

12. Do the same as 11 with equi join syntax.

To turn in

Turn in the SQL code