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

Instruction

Good! How about this one?

Exercise

Show the name, initial price, and final price of every item with initial price greater than $300.

If the item wasn't sold (there was no bidding person), show the item's name anyway.

Stuck? Here's a hint!

Type:

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