I'm Working with stock management project and my client want sales of stock in ascending and descending order.
I have Stock structure as below
I want to sort the data as per the sales of the product.
NOTE: There are thousands of products in this database, so downloading and then sorting the data isn't good idea. I believe this will slow down the process.