I currently have the following:

Table Town:

* id
* name
* region

Table Supplier:

* id
* name
* town\_id

The below query returns the number of suppliers for each town:

```
SELECT t.id, t.name, count(s.id) as NumSupplier
FROM Town t 
INNER JOIN Suppliers s ON s.town_id = t.id 
GROUP BY t.id, t.name

```

I now wish to introduce another table in to the query, Supplier\_vehicles. A supplier can have many vehicles:

Table Supplier\_vehicles:

* id
* supplier\_id
* vehicle\_id

Now, the NumSupplier field needs to return the number of suppliers for each town that have any of the given vehicle\_id (IN condition):

The following query will simply bring back the suppliers that have any of the given vehicle\_id:

```
SELECT * FROM Supplier s, Supplier_vehicles v WHERE s.id = v.supplier_id AND v.vehicle_id IN (1, 4, 6)

```

I need to integrate this in to the first query so that it returns the number of suppliers that have any of the given vehicle\_id.