Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 572 Bytes

File metadata and controls

32 lines (22 loc) · 572 Bytes

English Version

题目描述

None

解法

SQL

SELECT s.product_id,
         s.year AS first_year,
         s.quantity,
         s.price
FROM Sales s
WHERE (product_id, year) IN
    (SELECT product_id,
         min(year)
    FROM Sales
    GROUP BY  product_id)