Download the Code iconUsing entity relationship diagrams (ERDs), Venn diagrams, and the tips about writing a complex join that I've provided in my join series, write queries to answer the following questions from the Northwind database. This month's questions 3 and 4 build on questions 1 and 2, which constituted the homework assignment for the T-SQL Tutor Project, April 2002.

Check out the homework answers in the NTableSearchConditionsHomework.sql script for lots of comments and help if you get stuck.

  1. Which customers have purchased beverages? For this query, list the order date, the customer name, and the beverage name.
  2. Change the query from question 1 to show all beverage products regardless of whether they've been ordered.
  3. Restrict this OUTER JOIN query to show all beverages sold in May 1998. Are the outer-join rows preserved? Why or why not?
  4. Which beverages weren't sold in May 1998?