Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Simple JOINs recap
6. JOIN and filtering
Various kinds of JOINs
Filtering with LEFT JOIN and RIGHT JOIN
Summary

Instruction

Good start! Of course, in JOIN queries we can use WHERE to filter results as in other queries.

SELECT
  FullName,
  Name
FROM Position
JOIN Employee
  ON Position.Id = Employee.PositionId
WHERE Employee.StartYear > 2016

Here we select full name and position name of employees who were hired after 2016.

Exercise

Show the name of each author together with the title of the book they wrote and the year in which that book was published.

Show only books published after 2005.

Stuck? Here's a hint!

Type:

SELECT
  Name,
  Title,
  PublishYear
FROM Author
JOIN Book
  ON Author.Id = Book.AuthorId
WHERE PublishYear > 2005