The main row will get rank 1, and the next rows get higher rankings. If any rows have the similar value from the column utilized for buying, They can be ranked exactly the same. The RANK() functionality leaves gaps in this sort of cases. To attain this, search engines like https://rsac.org