query w multiple sort working