📅  最后修改于: 2022-03-11 15:05:13.629000             🧑  作者: Mango
select a.passengerId passA,b.passengerId passB,count(*) numflightsTogether from df a inner join df b on (a.flightid=b.flightid and a.date=b.date ) where a.passengerid != b.passengerid group by a.passengerid,b.passengerid having count(*) >3