CREATE TABLE employees (
emp_id INTEGER PRIMARY KEY,
emp_name TEXT,
department_id INTEGER,
salary INTEGER
);
CREATE TABLE departments (
department_id INTEGER PRIMARY KEY,
department_name TEXT
);
INSERT INTO employees VALUES
(1,'Aarav',101,75000),
(2,'Priya',102,68000),
(3,'Rahul',101,82000),
(4,'Anjali',103,55000),
(5,'Karan',104,90000),
(6,'Neha',102,72000),
(7,'Rohan',105,65000),
(8,'Sneha',103,60000);
INSERT INTO departments VALUES
(101,'IT'),
(102,'Finance'),
(103,'HR'),
(104,'Sales'),
(105,'Marketing');
SELECT e.emp_name, d.department_name, e.salary
FROM employees e
JOIN departments d
ON e.department_id = d.department_id
WHERE d.department_name IN ('IT', 'Finance')
AND e.salary > 65000
ORDER BY e.salary DESC;
To embed this project on your website, copy the following code and paste it into your website's HTML: