SQ 387 then QR 3771 at Barcelona
Madrid → Barcelona → Basel
Timetable, Barcelona time
11:15SQ 387 from Madrid at the gate
08:45QR 3771 to Basel leaves the gate
21 h 30 apart on the timetable, overnight
QR 3771 leaves 21 h 30 after SQ 387 arrives on the timetable: more than half a day, so not a connection we count.