Implemented sort by location priority in SqlNg
Fixed: Map remoteId in integration tests.