SQLConfiguration SQLConfiguration


Select Data  «Prev  Next»

Multiple Table InnerJoin - Exercise

Retrieving data from multiple tables with inner and outer joins, part 2


Create an outer join


Objective: Practice creating an outer join

Exercise scoring

This exercise is worth a total of 25 points. You will receive up to 25 points for accurately creating the outer join as described in the instructions.

Instructions


Consider the Sales table that looks like this:

DivisionID

SaleAmount

101 150000
102 250000
103 10000
104 700000

Consider the Division table that looks like this:

DivisionID

DivisionName

101 North East
102 South East
103 Central
104 North West
105 South West

Construct a LEFT outer join query to return the DivisionName and SaleAmount for each division, even if that division has no sales.

Submitting the exercise

Type or paste your Transact-SQL statement into the text box below, then click Submit to submit them and view a results page.