Hãy thử truy vấn này
SELECT *
FROM products
WHERE items = 'apple'
AND itemtype = '1'
AND id >
(
SELECT MIN(id) AS id
FROM products
WHERE items = 'apple'
AND itemtype = '1'
)
AND id <
(
SELECT MIN(id)
FROM products
WHERE items = 'apple'
AND itemtype = '0'
AND id >
(
SELECT MIN(id) AS id
FROM products
WHERE items = 'apple'
AND itemtype = '1'
)
);