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
  AuctionItem.Name,
  InitialPrice,
  Bidder.FinalPrice
FROM AuctionItem
LEFT JOIN Bidder
  ON AuctionItem.Id = Bidder.BoughtItemId
WHERE AuctionItem.InitialPrice > 300