What is the id of the department store that has both marketing and managing department?
select t2.dept_store_id from departments as t1 join department_stores as t2 on t1.dept_store_id = t2.dept_store_id where t1.department_name = "marketing" intersect select t2.dept_store_id from departments as t1 join department_stores as t2 on t1.dept_store_id = t2.dept_store_id where t1.department_name = "managing"
What is the name of the department store that has both marketing and managing department?
select t2.store_name from departments as t1 join department_stores as t2 on t1.dept_store_id = t2.dept_store_id where t1.department_name = "marketing" intersect select t2.store_name from departments as t1 join department_stores as t2 on t1.dept_store_id = t2.dept_store_id where t1.department_name = "managing"
Can you show me all the id of the department store that has both marketing and managing department?
select t2.dept_store_id, t2.store_name from departments as t1 join department_stores as t2 on t1.dept_store_id = t2.dept_store_id where t1.department_name = "marketing" intersect select t2.dept_store_id, t2.store_name from departments as t1 join department_stores as t2 on t1.dept_store_id = t2.dept_store_id where t1.department_name = "managing"