Your personal SQL playground—connect, query, and master databases on your terms.
SQLBook lets you practice SQL against your own MySQL, PostgreSQL, MariaDB, or Oracle instances. No sample databases, no artificial constraints—just real queries on real data.
Given this table
DROP TABLE IF EXISTS employees;
CREATE TABLE employees (
id INT PRIMARY KEY,
name VARCHAR(100),
salary DECIMAL(10,2)
);
INSERT INTO employees VALUES
(1, 'Alice', 95000),
(2, 'Bob', 87000),
(3, 'Carol', 95000),
(4, 'Dave', 73000),
(5, 'Eve', 81000);
Find the second highest salary from employees table without using LIMIT or OFFSET.
Head over to SQL Editor to try it out.
Spoiler!!!
Solution is available here
SQL Output