0
I’m trying to use mysql to select two tables and assign the number of rows to a field for example
I have two tables: Grupo, Pessoa
I want to make a Join in the Group table showing the number of people assigned to this group through the field Group_id in Person.
The Select that I made:
SELECT u.* , (SELECT COUNT(*) FROM uniforms where u.id) as quantidade from uniforms_group U
but in return the amount of all rows is being assigned to all fields:
I imagined that this was missing but had succeeded. The relationship is between the group id and the person’s group_id field
– Luhan Salimena