建立临时表 With
# Write your MySQL query statement below
# 找出那些既没有最多,也没有最少参与者的活动的名字
# Activities 表中的任意活动都有在 Friends 中参与
with a as (select activity,
count(*) amount
from friends
group by activity)
select activity
from a
where amount > (select min(amount) from a )
and amount < (select max(amount) from a)