Answered
SQL - Finding the minimum value for each distinct record..
Hi All,
I have a table looks like this in SQL Server
Product Sale Date
A date
A date
A date
B date
B date
C date
C date
C date
I would like to write a query to find the minimum date (i.e. the date
of the first sale) for each product
Thus, the expected output would be
Product Sale Date
A min date
B min date
C min date
How can i do this using SQL Server??
any help is greatly appreciated!
Thanks!
I have a table looks like this in SQL Server
Product Sale Date
A date
A date
A date
B date
B date
C date
C date
C date
I would like to write a query to find the minimum date (i.e. the date
of the first sale) for each product
Thus, the expected output would be
Product Sale Date
A min date
B min date
C min date
How can i do this using SQL Server??
any help is greatly appreciated!
Thanks!
