Site: LeetCode
Difficulty per Site: Easy
Write a solution to report the product_name
, year
, and price
for each sale_id
in the Sales
table.
Return the resulting table in any order. [Full Description]
-- Submitted Solution
SELECT
p.product_name
,s.year
,s.price
FROM Sales AS s
JOIN Product AS p ON s.product_id = p.product_id
;
-- LeetCode Solution
-- Site solution essentially the same.
TODO
Go to Table of Contents
Go to Overview