I have a table below
ID Date
1 Null
1 Null
1 Null
1 02/02/2012
1 02/03/2012
1 02/04/2012
1 02/05/2012
I want to take the min date from the above table, this result should be Null
I tried to write
select min(date), Id from Table group by ID
then the result 02/02/2012, but I want Null.
Is there any other way to infer the Null value from the above table other than the method below?
select top 1 date, ID from table order by date asc
source
share