How to sort digits numerically when they are sorted alphabetically?¶
A column of numbers may sort in the wrong order because it is improperly typed. Convert the column to int64
to make it sort numerically.
convert string to int64 and sort¶
Use the int64
function to convert the string column and the sort
function to order from maximum to minimum.
make_col userID:int64(userID)
sort desc(userID)