SELECT derivatives.`derivative_id` AS `54.80.113.118_new_deal`, derivatives.`manufacturer_id`, derivatives.`discontinued`, derivatives.`range_id`, derivatives.`model_id`, derivatives.`derivative_id`, manufacturers.`manufacturer_name`, models.`model_name`, ranges.`range_name`, derivatives.`derivative`, derivatives.`derivative_id`, derivatives.`image_id`, derivatives.`body_id`, derivatives.`cap_code`, derivatives.`doors`, derivatives.`spec_checked`, derivatives.`spec_top_speed`, derivatives.`spec_0_62`, derivatives.`spec_insurance_group`, derivatives.`spec_ec_combined`, derivatives.`spec_co2`, derivatives.`spec_ncap`, derivatives.`fuel_type_id` AS `fuel_id`, derivatives.`fuel_delivery_id`, derivatives.`transmission_id`, transmission.`title` AS `transmission_title`, fuel_type.`title` AS `fuel_title`, fuel_delivery.`title` AS `fuel_delivery_title`, body.`title` AS `body_title` , deals.`type` AS `car_type`, deals.`private_notes`, deals.`ref_id`, deals.`deal_id`, deals.`stock`, deals.`dcd`, deals.`used`, deals.`image_override`, derivatives.`image_override_id`, deals.`deleted` AS `deal_deleted`, dealers.`deleted` AS `dealer_deleted`, dealers.`company_name`, dealers.`hide_personal`, dealers.`charge_phone`, deals.`dealer_id`, deals.`bool_leasing`, dealers.`notify_email`, deals.`bool_pcp`, deals.`bool_hp`, deals.`description`, dealers.`default_comment`, deals.`bool_terms`, deals.`bool_delivery`, deals.`bool_tax`, deals.`bool_maintenance`, deals.`bool_metallic`, deals.`bool_warranty`, deals.`bool_breakdown`, deals.`used_dealer_id`, deals.`used_reg_no`, deals.`used_reg_date`, deals.`used_vin`, deals.`used_exterior_colour`, deals.`used_mileage`, deals.`used_main_image`, deals.`used_other_images`, deals.`used_warranty`, deals.`used_keepers`, deals.`used_service_history`, deals.`used_approved`, deals.`used_plate`, deals.`used_year`, deals.`price_ontheroad` FROM deals LEFT JOIN manufacturers ON manufacturers.`manufacturer_id`=deals.`manufacturer_id` LEFT JOIN models ON models.`model_id`=deals.`model_id` LEFT JOIN ranges ON ranges.`range_id`=deals.`range_id`, derivatives LEFT JOIN transmission ON transmission.`transmission_id`=derivatives.`transmission_id` LEFT JOIN fuel_type ON fuel_type.`fuel_type_id`=derivatives.`fuel_type_id` LEFT JOIN fuel_delivery ON fuel_delivery.`fuel_delivery_id`=derivatives.`fuel_delivery_id` LEFT JOIN body ON body.`body_id`=derivatives.`body_id`, dealers WHERE derivatives.`derivative_id`=deals.`derivative_id` AND deals.`deleted`='0' AND (deals.`start_date`='0' OR deals.`start_date` <= '1413844140') AND (deals.`expiry_date`='0' OR deals.`expiry_date` >= '1413498540') AND dealers.`deleted`='0' AND deals.`dcd`='0' AND prices.`site_id` NOT IN (2,4) AND prices.`mileage_id` IN (0,4) AND deals.`deal_id`='240968' AND deals.`dealer_id`=dealers.`dealer_id` LIMIT 1 - Unknown column 'prices.site_id' in 'where clause'