-

Select am.article_id, article_headline, article_headline as headline, am.article_homepage_headline as homepage_headline, am.article_page_title as page_title, am.article_short_description as short_description, am.article_keywords as keywords, article_homepage_headline, article_page_url, article_story_label, article_short_description, article_description,gallery_id, is_midday_shots, midday_shorts_image, is_inquilab, category_id, (select cm.category_master_name from category_master cm where cm.category_master_id=am.category_id and cm.active='Y') as category_name, sub_category_id, (select scm.sub_category_master_name from sub_category_master scm where scm.sub_category_master_id=am.sub_category_id and scm.active='Y') as sub_category_name, article_date, article_time_r, article_date1, article_time, article_date as date, article_time_r as time_r, article_date1 as date1, article_time as time, article_tags, article_location, article_page_title, article_type, article_meta_description, article_meta_description as meta_description, article_keywords, article_image, article_image as image, article_image2, article_image1, article_image_caption, article_image_caption as image_caption, key_highlights1, key_highlights2, key_highlights3, sm_active, article_epoch, article_byline, article_byline1,article_written_by,article_compiled_by, is_paid, is_ai_sponsored_tag, amount, am1.author_id as author1_id, am2.author_id as author2_id, am1.author_email as author1_email, am2.author_email as author2_email,if ((select aml.article_id from article_master_206m aml where aml.category_id=am.category_id and aml.sub_category_id=am.sub_category_id and aml.active='Y' order by aml.article_id desc limit 1)=23395509, 'last', 'not_last') as is_last, (Select am3.article_id from article_master_206m am3 Where am3.article_id>am.article_id and am3.category_id=am.category_id AND CASE WHEN am.sub_category_id IS NOT NULL THEN am3.sub_category_id=am.sub_category_id ELSE TRUE END and am3.active='Y' order by am3.article_id ASC LIMIT 0,1) as next_article_id, (Select am4.article_page_url from article_master_206m am4 Where am4.article_id>am.article_id and am4.category_id=am.category_id AND CASE WHEN am.sub_category_id IS NOT NULL THEN am4.sub_category_id=am.sub_category_id ELSE TRUE END and am4.active='Y' order by am4.article_id ASC LIMIT 0,1) as next_article_page_url, (Select am5.article_headline from article_master_206m am5 Where am5.article_id>am.article_id and am5.category_id=am.category_id AND CASE WHEN am.sub_category_id IS NOT NULL THEN am5.sub_category_id=am.sub_category_id ELSE TRUE END and am5.active='Y' order by am5.article_id ASC LIMIT 0,1) as next_article_headline,am.poll_id from article_master_206m am left join author_master am1 on am.article_byline=am1.author_name and am1.active='Y' left join author_master am2 on am.article_byline1=am2.author_name and am2.active='Y' where am.article_id=23395509 and am.active='Y'

Error