SQL
All Top 50 SQL Interview Questions#7
Implement API Pagination with LIMIT and OFFSET in SQL
EasyInterview Question #7
Given an `articles` table, write a SQL query to retrieve page 3 of articles, where each page contains 10 articles. Sort articles by `published_at` descending.
Input Table: articles
2 rows preview| article_id | title | published_at |
|---|---|---|
| 1 | Data Trends 2026 | 2026-03-01 |
| 2 | SQL Guide | 2026-02-28 |
Expected Output Structure1 rows
| article_id | title | published_at |
|---|---|---|
| 21 | Article 21 | 2026-02-10 |
Interview Context
Asked frequently in data analyst and business analyst technical rounds. Focus on clean filtering, optimal indexing usage, and unambiguous column selection.
PostgreSQL 15
Ready to execute
Click "Run Query" or press Ctrl + Enter to test your query.
Output will be verified against the test dataset.