Good evening. I'm not finding a way to, using or just calling a VIEW, count how many teachers there are in a given category, whose output should be the category and the quantity.
The VIEW I made is as follows:
CREATE VIEW VMostraProfessor AS
SELECT pro_nome AS Nome, cat_nome AS Categoria, tit_nome AS Titulação,
CONVERT(VARCHAR(10), pro_nascimento, 103) AS Nascimento, cid_nome AS Cidade, pro_sexo AS Sexo FROM Professor p
inner join categoria c ON c.cat_id = p.cat_id
inner join titulacao t ON t.tit_id = p.tit_id
inner join cidade cd ON cd.cid_ID = p.cid_id;
Can you do this in the call or inside the view? (Preferably on call)
Thanks for the help!