-- List all the distinct employees
SELECT employee_id, first_name || ' ' || last_name AS name, email, phone_number,
hire_date, salary
FROM employees;
-- List all the job ids and titles with a max salary of less than $15000 and a min
salary greater than $9000
SELECT job_id, job_title
FROM jobs
WHERE max_salary < 15000 AND min_salary > 9000;
-- List all the rows in the locations table where the country is equal to the
United States
SELECT *
FROM locations
WHERE country_id = 'US';
-- Insert a row containing your information into the employees' table
INSERT INTO employees(employee_id, first_name, last_name, email, phone_number,
hire_date, job_id, salary, manager_id, department_id)
VALUES (2000, 'YourFirstName', 'YourLastName', 'your.email@example.com',
'1234567890', DATE '2023-11-30', 6, 10000.00, 100, 5);
-- Insert into the dependent table any dependents you may have
INSERT INTO dependents(dependent_id, first_name, last_name, relationship,
employee_id)
VALUES (1000, 'DependentFirstName', 'DependentLastName', 'Child', 2000);
-- Update the hire date from the employee with the id 192 to 2020-10-16 in the
employee table
UPDATE employees
SET hire_date = DATE '2020-10-16'
WHERE employee_id = 192;
-- Delete the row with a job id equal to 17 from the jobs table
DELETE FROM jobs
WHERE job_id = 17;
-- Rollback the changes made
ROLLBACK;
-- Retrieve all the tuples stored in the countries table in descending order based
on the country's id
SELECT *
FROM countries
ORDER BY country_id DESC;
-- Retrieve the columns' region name and country name from the regions and country
tables, linking the two tables by matching values in related attributes
SELECT r.region_name, c.country_name
FROM regions r
INNER JOIN countries c ON r.region_id = c.region_id;