3803. Find Products with Valid Serial Numbers
My accepted SQL solution to LeetCode problem 3803, Find Products with Valid Serial Numbers, running in 430ms.
- Difficulty: Easy
- SQL
- Runtime 430ms
- Memory 0.0B
- Updated
Read the problem on LeetCode View on GitHub
The problem statement is LeetCode’s and stays on their site. What follows is my accepted solution.
SQL
Accepted on LeetCode — runtime 430ms, memory 0.0B, accepted 2026-01-02.
SELECT product_id, product_name, description
FROM products
WHERE REGEXP_LIKE(CONCAT(' ', description, ' '), ' SN[0-9]{4}-[0-9]{4} ', 'c')
ORDER BY product_id;