Employees SQL Assignment
DROP TABLE IF EXISTS employees;
CREATE TABLE employees (
employee_id SERIAL PRIMARY KEY,
first_name VARCHAR(50),
last_name VARCHAR(50),
department VARCHAR(50),
salary DECIMAL(10,2),
joining_date DATE,
age INT
);
Assignment Questions:
1. Retrieve all employees’ first_name and departments.
2. Increase IT salary by 10%.
3. Delete employees older than 34.
4. Add email column.
5. Rename department to dept_name.
6. Employees joined after 2021-01-01.
7. Change salary to INTEGER.
8. Order by salary DESC.
9. Insert Raj Singh record.
10. Increase age by 1.