0
我有兩個表: 隊(ID,姓名)和用戶(ID,姓名,TEAM_ID)計數SQL - 兩個表
我想下面的結果:
Team | Members
team1 | 10
team2 | 14
team3 | 8
我嘗試:
SELECT t.name AS 'Team', COUNT(u.email) AS 'Members' FROM teams t INNER JOIN users u ON (u.team_id = t.id)
但它不會工作。