mysql - How can I resolve this syntax error? -
im trying write query pull customer data email. query:
select opp.* ( select opp.*, row_number() on (partition opp.contact_email_address order opp.status_date desc) row_number opportunity_data opp opp.site = 'wesellinsurance' , opp.email_bounced = 'false' , opp.email_unsubscribed = 'false' , opp.first_mkt_medium not in ('partner', 'inbound_outbound') , opp.latest_mkt_medium not in ('partner','inbound_outbound') , opp.on_cover = 'false' , opp.primary_group in ('market_trader', 'food_stand', 'mobile_food_van', 'caterer') , opp.opportunity_status = ('quote_recieved','rfq_submitted', 'policy_expired_not_renewed') , datediff(day, cast(latest_rfq_submitted_date date),cast(getdate() date)) > 30 , opp.lifecycle = 'new_business' ) opp row_number = 1
most syntax analysers theres issue on line 7 cant seem see
in missing on line 18
select opp.* ( select opp.*, row_number() on (partition opp.contact_email_address order opp.status_date desc) row_number opportunity_data opp opp.site = 'wesellinsurance' , opp.email_bounced = 'false' , opp.email_unsubscribed = 'false' , opp.first_mkt_medium not in ('partner', 'inbound_outbound') , opp.latest_mkt_medium not in ('partner','inbound_outbound') , opp.on_cover = 'false' , opp.primary_group in ('market_trader', 'food_stand', 'mobile_food_van', 'caterer') , opp.opportunity_status in ('quote_recieved','rfq_submitted', 'policy_expired_not_renewed') --------------^ , datediff(day, cast(latest_rfq_submitted_date date),cast(getdate() date)) > 30 , opp.lifecycle = 'new_business' ) opp row_number = 1
Comments
Post a Comment