D
D
Daniil Sukhikh2018-04-21 12:28:38
MySQL
Daniil Sukhikh, 2018-04-21 12:28:38

How to display the 5 largest values ​​from the database?

There is a users table, it has a column of coins, how to display 5 lines with the largest coins parameter?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
pcdesign, 2018-04-21
@danchiksux

select * from users order by coins desc limit 0,5

S
S1mF, 2018-04-21
@S1mF

select top 5 elements sorted in descending order by column coins

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question