Person Table
ID FirstName LastName PersonalWealth
1 Hello Alest $10,000.00
2 Leeds United $20,000.00
3 Middle Brough $30,000.00
4 Arsenal Chelsey $40,000.00
5 Manchester United $50,000.00
6 Peter Mean $60,000.00
7 Hello Coward $60,000.00
Car Table
ID CarRego Model Make Manufacture Year PersonID
1 abc123 Van Toyota 2001 1
2 abc234 Ute Honda 2005 1
3 pio345 Hatchback Mitsubishi 1990 2
4 elf234 Hatchback Ford 1996 3
5 flo124 Hatchback Toyota 1992 4
6 asc234 hatchback Holden 1965 6
7 xyz hatchback Holden 1998 5
8 avc Van jhjhjkhk 1989 1
Here is the SQL code that i have
SELECT
Count(Car.ID) AS CountOfid1,
Car.Model
FROM person
INNER JOIN Car ON person.ID=Car.ID
GROUP BY Car.Model;
But it works with van saying 2 of them but in real there is only one owner how do i fix this?
Help would be much appreciated