LeetCode solutions

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

Read the problem on LeetCode View on GitHub

SQL

Accepted on LeetCode — runtime 430ms, memory 0.0B, accepted 2026-01-02.

sql
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;

Source