SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
CREATE TABLE employees ( employee_id INT PRIMARY KEY, first_name VARCHAR(50), last_name VARCHAR(50), department_id INT, salary DECIMAL(10, 2) ); INSERT INTO employees (employee_id, first_name, last_name, department_id, salary) VALUES (1, 'Cameron', 'Diaz', 1, 5000), (2, 'Alexey', 'Vishnia', 1, 6000), (3, 'Jim', 'Carrey', 2, 5500), (4, 'Vanessa', 'Mae', 2, 7000), (5, 'Eddie', 'Murphy', 3, 7500); SELECT * FROM employees; WITH HighSalaryEmployees AS ( SELECT employee_id, first_name, last_name, salary FROM employees WHERE salary > 5000 ) SELECT * FROM HighSalaryEmployees;

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear