# From server_logs, build a log identifier that zero-pads log_id to 6 digits with the prefix 'LOG-' (e

Canonical URL: <https://datadriven.io/problems/from-serverlogs-build-a-log-identifier-that-zero-pads-log-59b2db13>

Domain: SQL · Difficulty: medium

## Problem

From server_logs, build a log identifier that zero-pads log_id to 6 digits with the prefix 'LOG-' (e.g., 'LOG-000001'). Show log_id, server_name, and the result. Order by log_id, limit 5.

## Related

- [All practice problems](https://datadriven.io/problems)
- [Mock interview mode](https://datadriven.io/interview/from-serverlogs-build-a-log-identifier-that-zero-pads-log-59b2db13)
- [SQL Interview Questions](https://datadriven.io/sql-interview-questions)
- [Data Engineering Interview Prep Guide](https://datadriven.io/data-engineer-interview-prep)
- [Daily Challenge](https://datadriven.io/daily)

---

Source: DataDriven (https://datadriven.io). 100% free data engineering interview prep. Live code execution against Postgres 16, Python 3.11, and Spark sandboxes. No paywall, no premium tier, no signup gate.