DY 4506 then D8 2031 at Arlanda
Berlin → Stockholm → Riga
Timetable, Stockholm time
15:20DY 4506 from Berlin at the gate
14:00D8 2031 to Riga leaves the gate
22 h 40 apart on the timetable, overnight
D8 2031 leaves 22 h 40 after DY 4506 arrives on the timetable: more than half a day, so not a connection we count.