Yeah, like "... AS LastEvent ON ( LastEvent.id = ( SELECT id FROM Events ... ) )"

I was a bit surprised that it works as is, because sqlite has to evaluate an output value in order to make the join.  Obviously they implement this correctly, but it goes against my intuitive model of how to process the query.