https://www.dropbox.com/s/txly3dh2os9oq4x/DBHW03.docx?dl=0 4.For each department
ID: 3598440 • Letter: H
Question
https://www.dropbox.com/s/txly3dh2os9oq4x/DBHW03.docx?dl=0
4.For each department, show its department name and the country name of their department. (hint:27records)
5.Write down the SQL to show the full name (in one attribute) of employees andtheir relateddepartment name. If an employee has no department, we will still have the record to show theemployee name without a related department name. (hint: 107 records)
6.Write down the SQL to insert a new record (region_id=10, region_name=moon) inthe regions table.
Explanation / Answer
4)select department_name, country_name from departments, locaTons, countries where departments.locaTon_id=locaTons.locaTon_id and locaTons.country_id= countries.country_id;
5)select ²rst_name || ' ' || last_name as FullName, department_name from employees, departments where employees.department_id=departments.department_id(+);
5)insert into regions (region_id, region_name) values (10, 'moon');
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.