Topic: Subquery in from or case?
Problem in request. It is necessary to deduce kol-in victories of each pair during the project.
Fought long, to begin and could not. Thought to do through CASE or to do the new table...
Operating time were in the plan
SELECT ID_para, SUM (ball) result; case result when = then ' 1_win ' else ' lose ' end comment and FROM sostav_sudi s JOIN vistuplenie v ON s.id_vistyplenia=v.id WHERE dtvist = "2017-10-03" GROUP BY ID_para
Whether At once there is a request it is possible to do case in case?
Intuitively understanding that the given construction will be big, besides it is necessary to invent further count _wins, becomes ripe a question, whether there is such possibility as in languages, to fulfill a cycle with count in a variable. Since in books and Google, clarified only presence if constructions and not necessary ..
Composition of judges