fetch both first and last row from table

join shbcf.ru