0
I am trying to make several queries (counting the amount of certain elements) within the same table column, and send each query to a different column. Ex: I have column of names, and I want to consult the quantity of some surnames as: quantity of "Silva", "Alves" and "Santos". And create a "Silva" column with the number of names with Silva, and etc.
What I thought:
SELECT COUNT(`coluna_1`) AS `Nome`
(SELECT COUNT (`coluna_1`) AS `Nome_1`
FROM `Tabela_1` AS `A`
WHERE (`A`.`coluna_1` LIKE '%nome_1%')
FROM `Tabela_1` AS `B`
WHERE (`B`.`coluna_1` LIKE '%nome%'