Answer the question
In order to leave comments, you need to log in
How to display TOP buyers from a SQL database with a query?
Hello, I can’t make a query to the database in any way, I’ve been sitting for two days and I can’t correctly display the records
from the database. Google could not help :)
There is a table where there is, for example, Username | Amount1 | Amount2 | Amount3
These where amount stores amounts like 105.56 and so on. In general, numbers.
I need to output like this, calculate for each user Amount1 + Amount2 + Amount3 and display the result on the page, for example, the largest tops 20. That is, in descending order of the amount. There can be up to several thousand entries in a table.
What do you recommend?
Thank you so much in advance for taking the time to help
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question