Here is an approach using UNION :
SELECT column1, column2 FROM mytable WHERE series = 'white' AND ID IN ( SELECT MIN(ID) FROM mytable WHERE series = 'white' UNION SELECT MAX(ID) FROM mytable WHERE series = 'white' )
For good performance, add a combined index on (series, id) .
Or another option that may have better performance:
( SELECT column1, column2 FROM mytable WHERE series = 'white' ORDER BY ID LIMIT 1 ) UNION ( SELECT column1, column2 FROM mytable WHERE series = 'white' ORDER BY ID DESC LIMIT 1 )
It will also be able to use the combined index on (series, id) .
source share