Margareta Markovitch has 2 titles
what should be the sql query to find who have change in their title in different time period?
1 answers ( 0 marked as helpful)
Hi Abrar!
Thanks for reaching out.
You can use the following code:
SELECT
e.first_name, e.last_name, COUNT(t.title) AS cnt
FROM
employees e
JOIN
titles t ON e.emp_no = t.emp_no
GROUP BY e.emp_no
HAVING
cnt > 1;
Hope this helps.
Best,
Tsvetelin