I want to know the store chains with the largest department stores
select dept_store_chain_id from department_stores group by dept_store_chain_id order by count ( * ) desc limit 1
What about the ID of the department store chain that has the second largest number of department stores?
select dept_store_chain_id from department_stores group by dept_store_chain_id order by count ( * ) desc limit 2 except select dept_store_chain_id from department_stores group by dept_store_chain_id order by count ( * ) desc limit 1
OK, do you have the names of the above stores?
select store_name from department_stores group by dept_store_chain_id order by count ( * ) desc limit 2
What about their store address?
select store_address from department_stores group by dept_store_chain_id order by count ( * ) desc limit 2
Kindly let me know the store emails of the above stores
select store_email from department_stores group by dept_store_chain_id order by count ( * ) desc limit 2