How to write SQL query leftjoin?

with table like this I want to answer:

Given the Employee and AnnualReviews tables, write a query to return all employees who have never had a review sorted by HireDate.

Here is my query, kindly help to correction:
Select

LastName,
FirstName

from Employee a leftjoin AnnualReviews b ON a.ID = b.EmpID
where HireDate desc

Group by
ID

>Solution :

SELECT * FROM employee
WHERE terminationdate IS NULL AND lastname LIKE ‘SMITH%’
ORDER BY lastname, firstname;

Leave a Reply