Answer the question
In order to leave comments, you need to log in
How to get the biggest value based on 2 columns?
I get users with the largest balance like this:
SELECT * FROM balances ORDER BY balance DESC LIMIT 10;
Answer the question
In order to leave comments, you need to log in
Bind by user code and fold.
Can you give more details?
Is it possible to do something else to give the user code?
SELECT balances.[КодПользователя],
( bank.balances + balances.balance ) AS balances
FROM balances
JOIN bank ON bank.[КодПользователя] = balances.[КодПользователя]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question