delete_status = ? and car_type != ? and ul.client_id!=? and  delete_status = ?  and  car_type != ?  and  daily_price_status=? and ul.client_id in (select client_id from `clients` where emirate like  ?) and  car_model IN (?) and  car_make IN (?,?) and  car_make IN (?,?) and ul.client_id!=?and cl.emirate=? and ul.delete_status = ? and ul.publish_ocd = ?
Array
(
    [0] => 0
    [1] => 2
    [2] => 247
    [3] => 0
    [4] => 2
    [5] => 1
    [6] => %Dubai%
    [7] => 69
    [8] => 473
    [9] => 473
    [10] => 473
    [11] => 473
    [12] => 247
    [13] => Dubai
    [14] => 0
    [15] => 1
)

SELECT cs.car_spec_id specId, cs.car_spec_name specName, count(ul.id) listingCount
        FROM `usedcar_listings` ul  JOIN car_specs cs on cs.car_spec_id = ul.`car_spec_id` JOIN  clients cl on cl.client_id=ul.client_id
        WHERE  delete_status = ? and car_type != ? and ul.client_id!=? and  delete_status = ?  and  car_type != ?  and  daily_price_status=? and ul.client_id in (select client_id from `clients` where emirate like  ?) and  car_model IN (?) and  car_make IN (?,?) and  car_make IN (?,?) and ul.client_id!=?and cl.emirate=? and ul.delete_status = ? and ul.publish_ocd = ?  GROUP by cs.car_spec_id ORDER BY 
        CASE WHEN cs.car_spec_name = 'GCC Specs' THEN 0 ELSE 1 END, cs.car_spec_name ASC