FR 4641 then DY 2040 at Arlanda
Riga → Stockholm → Berlin
Timetable, Stockholm time
14:00FR 4641 from Riga at the gate
09:00DY 2040 to Berlin leaves the gate
19 h apart on the timetable, overnight
DY 2040 leaves 19 h after FR 4641 arrives on the timetable: more than half a day, so not a connection we count.