Frage im Vorstellungsgespräch bei Tata Consultancy Services

1 SQL query( left join), a pattern printing problem