Fix Risk QA test

Use proper SQL ordering in getting actual data from QA tests, such that the final results is predictable.