All our Data Science projects include bite-sized activities to test your knowledge and practice in an environment with constant feedback.
All our activities include solutions with explanations on how they work and why we chose them.
Write a query to retrieve:
All the information for employees from the titles table and apply the following filtering criteria :
to_date of '9999-01-01')Order the results by from_date in ascending order.
Write a query to retrieve:
All the information for employees from the titles table who :
title Staff or Senior Staff (indicated by to_date '9999-01-01')from_date '2009-01-01')Order the results by emp_no
Write a query to retrieve the emp_no, title, and from_date of employees from the titles table who are currently employed as Senior Engineer or Senior Staff and have been with the company since before January 1, 1996.
Write a query to retrieve all the information of employees from the titles table who worked as Assistant Engineer or Engineer for at least 5 years but are not currently employed.
Write a query to retrieve all the information of employees from the salaries table who have a salary greater than 80000, are still currently employed (indicated by to_date of '9999-01-01') and were hired before 2005-01-01.
Order the result by salary in descending order.
Write a query to retrieve all the information of employees from the salaries table who meet the following criteria:
to_date of '9999-01-01') is between 70000 and 80000to_date )from_date) started after January 1, 1995emp_no, then by from_date.Write a query to retrieve the emp_no, first_name, last_name, gender, and hire_date of male employees from the employees table (gender = 'M') who were hired between January 1, 1980 (inclusive), and January 1, 1990 (exclusive).
Order the results by hire_date.
Write a query to retrieve the emp_no, first_name, last_name, birth_date, and hire_date of female employees from the employees table (gender = 'F') who were born after January 1, 1960, and hired before January 1, 1990.
Order the results by birth_date.
Write a query to retrieve the emp_no, first_name, last_name, and hire_date of employees from the employees table whose first names alphabetically come before N, and who were hired between January 1, 1990 (inclusive), and January 1, 2000 (exclusive).
Order the results by first_name and hire_date.
Write a query to retrieve the emp_no, first_name, last_name, and birth_date of employees from the employees table who were born between January 1, 1950 (inclusive), and January 1, 1960 (exclusive), and whose last names alphabetically fall between a and m ( both inclusive ).
Order the results by last_name and birth_date.
Write a query to retrieve the emp_no, dept_no, from_date, and to_date of employees from the dept_emp table who are currently working (indicated by to_date = '9999-01-01') in departments numbered between d001 and d005.
Order the results by dept_no and from_date.
Write a query to retrieve the emp_no, dept_no, from_date, and to_date of employees from the dept_emp table who either started working in the 1990s (between January 1, 1990 (inclusive), and January 1, 2000 (exclusive)), or whose employment ended within this time frame but are no longer working (indicated by to_date not being '9999-01-01').
Order the results by from_date.