Good evening,
I’m searching to translate this mysql query in mongodb, how is it ??
select d.surname, d.forename, c.name, rcs.year, rcs.name, r.raceId, r.fastestLapSpeed
from ((results r join drivers d on r.driverId = d.driverId)
join constructors c on c.constructorId = r.constructorId)
join races rcs on r.raceId = rcs.raceId
where r.fastestLapSpeed > (
select avg(rr.fastestLapSpeed)
from results rr
where rr.raceId = r.raceId
group by rr.raceId
)