Mysql
 sql >> Base de Dados >  >> RDS >> Mysql

Contar instâncias na Tabela1 E vincular à Tabela2

 SELECT t1.Prices, COUNT(t1.ID) AS TheCount, t2.Genre
 FROM Table1 AS t1
     INNER JOIN Table2 AS t2
         ON t1.ID = t2.ID
 GROUP BY t1.Prices, t2.Genre