1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP BY j.job_id DESC' at line 41

your query is: SELECT j.job_id,j.job_code,j.job_title,j.job_company_id, j.job_city,j.job_state,j.job_country,j.job_zip,j.job_other_benefits ,j.job_other_skills,j.job_description,j.job_requirements,j.job_seeker_allow_info,j.job_compensation_from, j.job_compensation_to,j.job_compensation_currency,j.job_compensation_type,j.job_compensation_checkbox, DATE_FORMAT(j.created_on, '%d-%m-%Y') as created_on, DATE_FORMAT(j.created_on, '%Y-%m-%d') as datePosted,j.job_skills, j.job_client_description,j.job_region, j.job_allowance, j.job_transport, j.job_transport_ticket, j.job_medical_assistance, j.job_agreement_dentistry, j.job_life_insurance, j.job_meal, j.job_food_basket, j.job_meal_tickets, j.job_food_tickets, job_auto_aid,j.publish_client_name, c.country_name, c.country_code, s.state_name, s.state_code, ct.city_name, ct.city_code,cm.company_name,cm.company_type, cm.company_logo, CONCAT(first_name,' ',last_name) AS recruiter_name,u.email_address, GROUP_CONCAT(DISTINCT(ddo1.drop_down_option_value) SEPARATOR ', ') as job_category_name, ddo2.drop_down_option_value as applicant_career_level, GROUP_CONCAT(DISTINCT(ddo3.drop_down_option_value) SEPARATOR ', ') as applicant_job_type, ddo4.drop_down_option_value as applicant_travel_option, ddo5.drop_down_option_value as job_compensation_currency, ddo6.drop_down_option_value as job_compensation_type, ddo7.drop_down_option_value as job_region_name, ddo8.drop_down_option_value as job_shift_name, ddo9.drop_down_option_value as job_education_name, cm1.company_name as clientName, j.job_region_other FROM jobs j LEFT JOIN companies cm ON cm.company_id=j.job_company_id LEFT JOIN companies cm1 ON cm1.company_id=j.job_client_id LEFT JOIN countries c ON c.country_id=j.job_country LEFT JOIN states s ON s.state_id=j.job_state LEFT JOIN cities ct ON ct.city_id=j.job_city LEFT JOIN job_categories jc ON jc.job_id = j.job_id LEFT JOIN users u ON (u.user_id=j.job_recruiter_id AND u.deleted=0) LEFT JOIN drop_down_options ddo1 ON ddo1.drop_down_option_id = jc.drop_down_option_id LEFT JOIN drop_down_options ddo2 ON j.job_career_level=ddo2.drop_down_option_id LEFT JOIN job_types jt ON jt.job_id=j.job_id LEFT JOIN drop_down_options ddo3 ON jt.type_id=ddo3.drop_down_option_id LEFT JOIN drop_down_options ddo4 ON j.job_travel_required=ddo4.drop_down_option_id LEFT JOIN drop_down_options ddo5 ON j.job_compensation_currency=ddo5.drop_down_option_id LEFT JOIN drop_down_options ddo6 ON j.job_compensation_type=ddo6.drop_down_option_id LEFT JOIN drop_down_options ddo7 ON j.job_region=ddo7.drop_down_option_id LEFT JOIN drop_down_options ddo8 ON j.job_shift=ddo8.drop_down_option_id LEFT JOIN drop_down_options ddo9 ON j.job_education=ddo9.drop_down_option_id WHERE j.job_id= GROUP BY j.job_id DESC