leetcode

Solution to some Leetcode problems written in C++
git clone git://git.dimitrijedobrota.com/leetcode.git
Log | Files | Refs | README | LICENSE

1070.sql (211B)


      1 SELECT product_id,
      2        year AS first_year,
      3        quantity AS quantity,
      4        price
      5 FROM Sales
      6 WHERE (product_id, year) IN (
      7     SELECT product_id, MIN(year) AS year
      8     FROM Sales
      9     GROUP BY product_id
     10 )