SELECT DISTINCT
Count(cars.ID) as rows,
car_makes.ID,
car_makes.title as make
FROM
cars
INNER JOIN car_makes ON cars.make = car_makes.title
GROUP BY
car_makes.title
ORDER BY
car_makes.title ASC
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'rows,
car_makes.ID,
car_makes.title as make
FROM
cars
INNER JOIN car_mak...' at line 2