多くの方法がありますが、SQLをあまり変更せずに、id:
の<>の代わりよりも多くのことを実行できます。select e.name, e.day, e.distance, e.created_at, e2.created_at
from events e, events e2
where e.name = e2.name
and e.distance = e2.distance
and e.day = e2.day
and e.web_crawler_id = e2.web_crawler_id
and e.id > e2.id
and e.web_crawler_id = 1