pretty_sql: handle left joins