Loading...

Top Pattern Matches

A medium SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.

Domain
SQL
Difficulty
medium
Seniority
mid

Problem

Our server logs contain messages with embedded reference numbers. Find the 10 servers whose log messages most frequently match a pattern of a 3-digit prefix, a dash, then 4 or more digits. Return server_name and match count, from highest first.

Practice This Problem

Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a live PostgreSQL database and grades it instantly.