D
D
d1zz742021-07-03 14:26:58
MySQL
d1zz74, 2021-07-03 14:26:58

How to withdraw the amount from GROUP BY?

In the request:

SELECT d.name,
       sc.name,
       qg.count + qg.shortened + qg.total_tape as "План приёма",
       qg.count as "на базе 9 класса",
       qg.shortened as "на базе 10 класса",
       qg.total_tape as "на базе ТИПО",
       count(*) as "всего принято заявлений"
********
GROUP BY d.name, sc.name, qg.count + qg.shortened + qg.total_tape, qg.count, qg.shortened, qg.total_tape


Displays the amount, but like this:
college 1 / 123
college 1 / 12
college 1 / 345
and I need to have college 1 / and the whole amount is this

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Melnikov, 2021-07-03
@d1zz74

Aggregation is needed, SUM

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question