First and last record in one query

Hi Guys,

Is it possible for me to get the first and the last record in one query? There is a crude way to set pagination to 1,1 and then total,total to get the first and last record but by doing this, i have to query 3 times.
First to get total records, second to get first and third one to get the last record.

Can i get first and last record in one shot.

Thanks,