You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECTSalesTable.product_id, year AS first_year, quantity, price FROM Sales SalesTable JOIN (SELECT product_id, MIN(year) min_year FROM Sales GROUP BY product_id) AS MinValueTable ONSalesTable.product_id=MinValueTable.product_idWHERESalesTable.year=MinValueTable.min_yearANDSalesTable.product_id=MinValueTable.product_id