SQL: add multi-index support to legacy mode (#6881)

and at once also index_label kwarg support