Keyset Pagination
Medium
Query Optimization
Page through Orders ordered by id with 3 rows per page without using OFFSET. Write the query that fetches the page after the last seen id 6.
Table schema
Orders(id INT PRIMARY KEY, amount INT)Sample data
ids: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 (last seen id = 6)
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.