[DB-Fundamentals - Table Relations] - Problem 13. Employee 24
Здравейте,
Някой може ли да ми каже защо следното решение не минава в judge:
SELECT e.employee_id, e.first_name,
CASE
WHEN p.start_date > '20050101' THEN NULL
ELSE p.name
END AS project_name
FROM employees AS e
INNER JOIN employees_projects AS ep
ON e.employee_id = ep.employee_id
INNER JOIN projects AS p
ON ep.project_id = p.project_id
WHERE e.employee_id = 24
Когато реша задачата по този начин:
SELECT e.employee_id, e.first_name, p.name AS project_name
FROM employees AS e
INNER JOIN employees_projects AS ep
ON e.employee_id = ep.employee_id
LEFT OUTER JOIN projects AS p
ON ep.project_id = p.project_id
AND p.start_date < '20050101'
WHERE e.employee_id = 24
judge ми приема решението за вярно.
Резултатът от двете решения е идентичен, защо първото се отчита от judge като грешно?
Поздрави