GQ 311 then IB 834 at Athens
Samos → Athens → Madrid
Timetable, Athens time
16:45GQ 311 from Samos at the gate
15:50IB 834 to Madrid leaves the gate
23 h 05 apart on the timetable, overnight
IB 834 leaves 23 h 05 after GQ 311 arrives on the timetable: more than half a day, so not a connection we count.