I have two related tables ( Computers and Companies ).
Computers (the company column refers to the companies table.)
Companies
Using MYSQL, I want you to show me the result of how many computers there are in those companies.
- Company A - > 30 Computers
- Company B - > 23 Computers
- Company C - > 11 Computers
I am new to MYSQL and in advance. THANKS:)
I've been trying something like this:
SELECT empresas.name, computers.id
FROM computers
INNER JOIN empresas
ON empresas.id = computers.id;
... but I do not know the final way to count the result with COUNT
.