I have two columns (buying prince and sale price) and I want to calculate the difference between them. After that I want to order the result so I can see all the profit margins.
Can I do it with just one SELECT statement?
Thanks!
SELECT (sale_price - buy_price) AS profit
FROM table_name
ORDER BY profit DESC
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With