SELECT MIN(id) FROM tablo;
SELECT MAX(id) FROM tablo;
SELECT MIN(id) as minid,MAX(id) as maxid FROM tablo;