Utilisez la fonction d'agrégation MIN
:
SELECT MIN(date_added) AS OldestDate
FROM products_to_categories
WHERE products_id = 2085;
Si vous recherchez la date la plus ancienne pour chaque produit, ajoutez un GROUP BY
:
SELECT products_id, MIN(date_added) AS OldestDate
FROM products_to_categories
GROUP BY products_id;