Answer the question
In order to leave comments, you need to log in
Why does COUNT count only 1 user?
there is a base in it a list of users and a string value, I'm interested in these fields
user_id | contract_name
1 | ordinary
1 | strange
2 | ordinary
2 | strange
doing
SELECT user_id, dogovor_name, COUNT(*) AS cnt
FROM user_dolg
WHERE dogovor_name='обыкновенный'
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