Changed SqlSelect, so it can handle multiple entities (tables).