I am using the same table Bill_TabMethod for SQL Count.
Step 1. Write the below SQL Select statement in a Job like below
CODE:
static void SQLArrangeDesc(Args _args)
{
Bill_TabMethod btm;
while select * from btm order by btm.TotalAmt desc
print btm.TotalAmt;
pause;
}
Step 2. Run the code you will get the Result as