[I have tried sub queries and join queries but i did not get right answer i need to retrieve data from different tables. can someone help me please. I need answer of this question
Show the department Name, Street Address and
City of the department location and the Country Name
where the department is located for an employee
with the name Den Raphaely
I have tables like this.
SELECT Employees.FIRST_NAME, Employees.LAST_NAME,
Locations.City, Countries.Country_Name FROM
Countries INNER JOIN Locations ON
INNER JOIN Departments ON
INNER JOIN Employees ON
Departments.DEPARTMENT_ID = (SELECT Employees.DEPARTMENT_ID FROM Employees
WHERE FIRST_NAME LIKE 'Den' AND LAST_NAME LIKE 'Raphaely')
SELECT e.first_name, e.last_name, d.department_name, l.street_address, l.city, c.country_name FROM employees e INNER JOIN department d ON e.department_id = d.department_id INNER JOIN location l ON d.location_id = l.location_id INNER JOIN country c ON c.country_id = l.country_id WHERE e.first_name = 'Den' AND e.last_name = 'Raphaely'