X
X
XWR2021-08-14 11:41:52
Python
XWR, 2021-08-14 11:41:52

How to get maximum value in sqlite with username?

please help me

cursor.execute("SELECT MAX(ochki) FROM db")
all_db = cursor.fetchall()


I am outputting max points and I want to enter the player's name along with those points

. How do I do this?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Kuts, 2021-08-14
@XWR

Not the fact that this line is the only one ... Therefore, something like this:

SELECT * FROM db WHERE ochki=(select max(ochki) from db)

D
Daniil Kotyashkin, 2021-08-14
@ErVinTract

Try this code:
SELECT * FROM db LIMIT 1;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question