programming-examples/sql/JoinHRDatabase/17. Write a query in SQL to display the name of the country, city, and the departments which are running there.sql

5 lines
281 B
MySQL
Raw Normal View History

2019-11-18 14:05:53 +01:00
/*17. Write a query in SQL to display the name of the country, city, and the departments which are running there.*/
SELECT country_name,city, department_name
FROM countries
JOIN locations USING (country_id)
JOIN departments USING (location_id);