We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- SQL
- Advanced Select
- New Companies
- Discussions
New Companies
New Companies
Sort by
recency
|
2836 Discussions
|
Please Login in order to post a comment
select e.company_code, founder, count(distinct lead_manager_code), count(distinct senior_manager_code), count(distinct manager_code), count(distinct employee_code) from employee e inner join company c on e.company_code = c.company_code group by company_code, founder order by company_code
MS SQL SERVER
Complete video solution here - https://www.youtube.com/watch?v=jbXabK6kV8k&t=26s
For My SQL:
Notes
on
, you can alternatively useusing
if the 2 columns have the same name.Solution
1 -