Consider the schema with below tables
Table Name
Columns
people
company_id, id, name
companies
id, location_id, name
locations
id, name
For the location with the most companies, list the names of the people and the
companies they work for.
The output should consist of: User_Name Company Name Location
Answers
Answered by
0
Answer:
Can you tell that what is this...
Explanation:
Please mark me as in brainlist...
Give me some thanks..
Answered by
1
Answer:
Explanation:
select p.name, c.name,l.name from people p join
companies c on p.company_id = c.id
join locations l on c.location_id = l.id where l.id in (
select distinct location_id from
(select c.location_id,count(distinct id) from companies c group by c.location_id order by count(distinct c.id) desc limit 1) sql_sikh_lo_didi);
Similar questions