Context: CREATE TABLE department_stores (dept_store_id VARCHAR, store_name VARCHAR); CREATE TABLE departments (dept_store_id VARCHAR, department_name VARCHAR)
Question: What is the id and name of the department store that has both marketing and managing department?
Answer: 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"