How can I get the number of identical names from 2 tables, customer and suppliers.
Ex: The result is
Name. Qtd
Joao. 2
Pedro. 15
Miguel. 7
The code I have is the following.
Select nome from fornecedores where ativo = 1
Union all
Select nome from clientes where ativo = 1
I've tried count
but it does not work well.