SQ 387 then EC 7173 at Barcelona
Madrid → Barcelona → Berlin
Timetable, Barcelona time
11:15SQ 387 from Madrid at the gate
07:20EC 7173 to Berlin leaves the gate
20 h 05 apart on the timetable, overnight
EC 7173 leaves 20 h 05 after SQ 387 arrives on the timetable: more than half a day, so not a connection we count.