I have a requirement where from a View need to get result in a specific sorting order. Here is sample table and expected output-
Figure 1 - is the output of Select * from dbo.view_name;
Figure 2 - is how data has to sorted.
The data has to arrange in Descending order based on the last day BASE_PERCENTAGE. So Last day is 04-Feb-2017 and the highest to lowest order is Jessie, Ricky, Jammie and Jasmine. The final output should arrange data based on BASE_PERCENTAGE, CURR_DATE and Name.
Could someone please help to how to get the same result using sql. How sql can be written to that it gives the same result.
Please let me know if you need more explanation.
Attached Table_View_sql.sql is having table create, Sample Data Insert and View creation. View will give the data with BASE_Percentage. File Link
The trick is in the first line of the
answered Feb 15, 2017 at 10:39 AM