Accounts zonder lidmaatschap volgend jaar
Overzicht van accounts zonder lidmaatschap voor het volgende jaar, maar in het bezit van een lidmaatschap in het huidige jaar.
Per account wordt aangegeven of het lidmaatschap aan het einde van het huidige jaar is opgezegd (via profiel).
Fout
cannot calculate position of wp_woocommerce_order_items as wwoi2 ON wwoi2.order_id = wp2_posts.ID AND left(wwoi2.order_item_name,21) = concat("Lidmaatschap KCA ","2022") AND wwoi2.order_item_type <> 'coupon' within WHERE wp_users.ID NOT IN(SELECT wp_users.ID FROM `wp_users` INNER JOIN wp_postmeta as wp1_postmeta ON wp_users.ID = wp1_postmeta.meta_value and wp1_postmeta.meta_key = '_customer_user' INNER JOIN wp_posts as wp1_posts ON wp1_postmeta.Post_id = wp1_posts.ID AND wp1_posts.post_type = 'shop_order' AND wp1_posts.post_status = 'wc-completed' INNER JOIN wp_woocommerce_order_items as wwoi1 ON wwoi1.order_id = wp1_posts.ID AND left(wwoi1.order_item_name,21) = concat("Lidmaatschap KCA ","2023") AND wwoi1.order_item_type <> 'coupon' ) Order BY wp_users.ID
cannot calculate position of wp_woocommerce_order_items as wwoi2 ON wwoi2.order_id = wp2_posts.ID AND left(wwoi2.order_item_name,21) = concat("Lidmaatschap KCA ","2022") AND wwoi2.order_item_type <> 'coupon' within WHERE wp_users.ID NOT IN(SELECT wp_users.ID FROM `wp_users` INNER JOIN wp_postmeta as wp1_postmeta ON wp_users.ID = wp1_postmeta.meta_value and wp1_postmeta.meta_key = '_customer_user' INNER JOIN wp_posts as wp1_posts ON wp1_postmeta.Post_id = wp1_posts.ID AND wp1_posts.post_type = 'shop_order' AND wp1_posts.post_status = 'wc-completed' INNER JOIN wp_woocommerce_order_items as wwoi1 ON wwoi1.order_id = wp1_posts.ID AND left(wwoi1.order_item_name,21) = concat("Lidmaatschap KCA ","2023") AND wwoi1.order_item_type <> 'coupon' ) Order BY wp_users.ID