Is there any way to query a Cursor with the content sorted based on the row’s relationship between two columns?
For example, if I had two columns in my table:
- Basketball shots made
- Basketball shots attempted
is there any way I query a Cursor with the data sorted based on the “shot percentage” (i.e. made/attempted)?
Note that in order to get accurate sorting, you might need to cast to
DOUBLE(the above suggestions does integer division which didn’t provide correct results in all cases):