Don't practice throwing data from the user directly into your queries. It makes your database vulnerable to SQL injections. I'd suggest using Prepared Statements offered by MySQLi and PDO. They're immune to SQL injections and will save you a lot of headache.
I'm assuming owner_name is a string so therefore it must have single quotes around the value. This is basically you're query. Let's use my username for example
SELECT `car_year`, `car_name`, COUNT(*) as `total` FROM `company_inventory` WHERE owner_name = codeprada AND warehouse_id = 444 GROUP BY `car_name`, `car_year` ORDER BY `car_name` ASC
If the warehouse_id is an integer type then it's ok but owner_name fill cause the query to fail. Prepared statements also place the quotes around your values automatically if necessary.