Please note, this is a STATIC archive of website www.w3resource.com from 19 Jul 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.
w3resource

SQLite Exercise: Find the names and hire date of the employees who were hired after 'Jones'

Write a query to find the names (first_name, last_name) and hire date of the employees who were hired after 'Jones'.

Sample table : employees


SQLite Code:

SELECT e.first_name, e.last_name, e.hire_date 
FROM employees e 
JOIN employees davies 
ON (davies.last_name = "Jones") 
WHERE davies.hire_date < e.hire_date;

Output:

first_name  last_name   hire_date
----------  ----------  ----------
Alana		Walsh	1987-09-21
Kevin		Feeney	1987-09-22
Donald		OConnell1987-09-23
Douglas		Grant	1987-09-24
Jennifer	Whalen	1987-09-25
Michael		Hartstein1987-09-26
Pat		Fay	1987-09-27
Susan		Mavris	1987-09-28
Hermann		Baer	1987-09-29
Shelley		Higgins	1987-09-30
William		Gietz	1987-10-01

Practice SQLite Online


Model Database

Employee Model  Database - w3resource online SQLite practice

Structure of 'hr' database :

hr database

Improve this sample solution and post your code through Disqus.

Previous: Write a query to find the employee id, name (last_name) along with their manager_id, manager name (last_name).
Next: Write a query to get the department name and number of employees in the department.

What is the difficulty level of this exercise?