Sql optimise pr28 30 merged

Sql optimise pr28 30 merged
don't understand the order by clause 
should be order by rgt  asc