sql server - Select Min Date in SQL -


i have table below. want select min date , corresponding ticket status. tried showing me 2 or more plate numbers. want mindate. thanks

date       plateno     tickestatus 01-15-12              open 01-23-12       c        open 01-17-12              close 02-23-12       c        open 02-15-12              open 03-23-12       c        open 03-15-12              close 03-28-12       c        close 04-15-12              open 04-23-12       c        close 

select plateno, ticketstatus, [date] (select row_number() on (partition plateno order [date] asc) [index],              plateno,              ticketstatus,              [date]        yourtable) [index] = 1 

Comments