Answer the question
In order to leave comments, you need to log in
How to display data from database in ascending order?
Hello!
I have a task.
There is a database with 2 columns Name and Balance. There are 10 names and their accounts in the database.
How to display the 3 richest names? In the format:
1. Ivan 1000
2. Petya 403
3. Gena 399
Tell me, please.
Answer the question
In order to leave comments, you need to log in
SELECT * FROM user ORDER BY balance DESC LIMIT 10
Read the basics of sql.
Topic closed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question