7
I have an SQL that brings the number of people who graduated on a given date. Let’s say that of 300 people, 25 graduated on '2010-06-27'.
I would like to include two more columns that return the number of men and women of these 25 people who graduated that day.
SELECT count(*) AS 'quantidade',
data_nasc,
(SELECT count(*)
FROM formandos
WHERE genero = 'M') AS 'Quant'
FROM formandos
GROUP BY data_nasc
ORDER BY quantidade DESC
You can send the database structure?
– durtto