私は以下のようなテーブルを持っています
ID Date
1 Null
1 Null
1 Null
1 02/02/2012
1 02/03/2012
1 02/04/2012
1 02/05/2012
上記の表から最小の日付を取得したいのですが、その結果は次のようになります。Null
私は書き込もうとしていました
select min(date), Id from Table group by ID
結果はです02/02/2012
が、私は欲しいですNull
。
以下の方法を除いて、上記のテーブルからNull値をプルする他の方法はありますか?
select top 1 date, ID from table order by date asc