Simple JOINs recap
Various kinds of JOINs
Filtering with LEFT JOIN and RIGHT JOIN
Summary
18. Exercise 1

Instruction

Let's get started!

Exercise

For every auctioned item that was sold for a price greater than its initial price, show the item name together with the name of its buyer and the price they paid.

Stuck? Here's a hint!

Type:

SELECT
  auction_item.name,
  bidder.name,
  final_price
FROM auction_item
JOIN bidder
  ON auction_item.id = bidder.bought_item_id
WHERE final_price > initial_price

Console

Code editor

Result

TableConsole