I have one table I want to find first and last record that satisfy criteria of particular month.
select * from table where id = (select id from tab1 order by col1 asc limit 1) or id = (select id from tab1 order by col1 desc limit 1);