Skip to content

Commit fa5f401

Browse files
add 1371
1 parent 9486281 commit fa5f401

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -1116,6 +1116,7 @@ _If you like this project, please leave me a star._ ★
11161116
|1393|[Capital Gain/Loss](https://leetcode.com/problems/capital-gainloss/)|[Solution](../master/database/_1393.sql) || Easy |
11171117
|1384|[Total Sales Amount by Year](https://leetcode.com/problems/total-sales-amount-by-year/)|[Solution](../master/database/_1384.sql) || Hard |
11181118
|1378|[Replace Employee ID With The Unique Identifier](https://leetcode.com/problems/replace-employee-id-with-the-unique-identifier/)|[Solution](../master/database/_1378.sql) || Easy |
1119+
|1371|[The Number of Employees Which Report to Each Employee](https://leetcode.com/problems/the-number-of-employees-which-report-to-each-employee/)|[Solution](../master/database/_1371.sql) || Easy |
11191120
|1369|[Get the Second Most Recent Activity](https://leetcode.com/problems/get-the-second-most-recent-activity/)|[Solution](../master/database/_1369.sql) || Hard |
11201121
|1364|[Number of Trusted Contacts of a Customer](https://leetcode.com/problems/number-of-trusted-contacts-of-a-customer/)|[Solution](../master/database/_1364.sql) || Medium |
11211122
|1355|[Activity Participants](https://leetcode.com/problems/activity-participants/)|[Solution](../master/database/_1355.sql) || Medium |

database/_1371.sql

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
--# Write your MySQL query statement below
2+
select b.employee_id, b.name, count(*) as reports_count, round(avg(a.age)) as average_age
3+
from Employees a join Employees b on a.reports_to = b.employee_id
4+
group by b.employee_id
5+
order by b.employee_id

0 commit comments

Comments
 (0)