Ok, my evil eye is almost closed after the long day I have had today. But I dont have all that the other person had. So, I deleted the only one that was similar, and it left me with :
1emailAll CustomersReturns all customers name and email address for sending mass emails (ie: for newsletters, coupons, GV's, messages, etc).select customers_email_address, customers_firstname, customers_lastname from TABLE_CUSTOMERS order by customers_lastname, customers_firstname, customers_email_address[3email,newslettersDormant Customers (>3months) (Subscribers)Subscribers who HAVE purchased something, but have NOT purchased for at least three months.select o.date_purchased, c.customers_email_address, c.customers_lastname, c.customers_firstname from TABLE_CUSTOMERS c, TABLE_ORDERS o WHERE c.customers_id = o.customers_id AND c.customers_newsletter = 1 GROUP BY c.customers_email_address HAVING max(o.date_purchased) <= subdate(now(),INTERVAL 3 MONTH) ORDER BY c.customers_lastname, c.customers_firstname ASC4email,newslettersActive customers in past 3 months (Subscribers)Newsletter subscribers who are also active customers (purchased something) in last 3 months.select c.customers_email_address, c.customers_lastname, c.customers_firstname from TABLE_CUSTOMERS c, TABLE_ORDERS o where c.customers_newsletter = '1' AND c.customers_id = o.customers_id and o.date_purchased > subdate(now(),INTERVAL 3 MONTH) GROUP BY c.customers_email_address order by c.customers_lastname, c.customers_firstname ASC5email,newslettersActive customers in past 3 months (Regardless of subscription status)All active customers (purchased something) in last 3 months, ignoring newsletter-subscription status.select c.customers_email_address, c.customers_lastname, c.customers_firstname from TABLE_CUSTOMERS c, TABLE_ORDERS o WHERE c.customers_id = o.customers_id and o.date_purchased > subdate(now(),INTERVAL 3 MONTH) GROUP BY c.customers_email_address order by c.customers_lastname, c.customers_firstname ASC8email,newslettersAdministratorJust the email account of the current administratorselect 'ADMIN' as customers_firstname, admin_name as customers_lastname, admin_email as customers_email_address from TABLE_ADMIN where admin_id = $SESSION:admin_id9email,newslettersCustomers who have never completed a purchaseFor sending newsletter to all customers who registered but have never completed a purchaseSELECT DISTINCT c.customers_email_address as customers_email_address, c.customers_lastname as customers_lastname, c.customers_firstname as customers_firstname FROM TABLE_CUSTOMERS c LEFT JOIN TABLE_ORDERS o ON c.customers_id=o.customers_id WHERE o.date_purchased IS NULL1emailAll CustomersReturns all customers name and email address for sending mass emails (ie: for newsletters, coupons, GV's, messages, etc).select customers_email_address, customers_firstname, customers_lastname from TABLE_CUSTOMERS order by customers_lastname, customers_firstname, customers_email_address3email,newslettersDormant Customers (>3months) (Subscribers)Subscribers who HAVE purchased something, but have NOT purchased for at least three months.select o.date_purchased, c.customers_email_address, c.customers_lastname, c.customers_firstname from TABLE_CUSTOMERS c, TABLE_ORDERS o WHERE c.customers_id = o.customers_id AND c.customers_newsletter = 1 GROUP BY c.customers_email_address HAVING max(o.date_purchased) <= subdate(now(),INTERVAL 3 MONTH) ORDER BY c.customers_lastname, c.customers_firstname ASC4email,newslettersActive customers in past 3 months (Subscribers)Newsletter subscribers who are also active customers (purchased something) in last 3 months.select c.customers_email_address, c.customers_lastname, c.customers_firstname from TABLE_CUSTOMERS c, TABLE_ORDERS o where c.customers_newsletter = '1' AND c.customers_id = o.customers_id and o.date_purchased > subdate(now(),INTERVAL 3 MONTH) GROUP BY c.customers_email_address order by c.customers_lastname, c.customers_firstname ASC[5email,newslettersActive customers in past 3 months (Regardless of subscription status)All active customers (purchased something) in last 3 months, ignoring newsletter-subscription status.select c.customers_email_address, c.customers_lastname, c.customers_firstname from TABLE_CUSTOMERS c, TABLE_ORDERS o WHERE c.customers_id = o.customers_id and o.date_purchased > subdate(now(),INTERVAL 3 MONTH) GROUP BY c.customers_email_address order by c.customers_lastname, c.customers_firstname ASC8email,newslettersAdministratorJust the email account of the current administratorselect 'ADMIN' as customers_firstname, admin_name as customers_lastname, admin_email as customers_email_address from TABLE_ADMIN where admin_id = $SESSION:admin_id[9email,newslettersCustomers who have never completed a purchaseFor sending newsletter to all customers who registered but have never completed a purchaseSELECT DISTINCT c.customers_email_address as customers_email_address, c.customers_lastname as customers_lastname, c.customers_firstname as customers_firstname FROM TABLE_CUSTOMERS c LEFT JOIN TABLE_ORDERS o ON c.customers_id=o.customers_id WHERE o.date_purchased IS NULL
1
email
All Customers
Returns all customers name and email address for sending mass emails (ie: for newsletters, coupons, GV's, messages, etc).
select customers_email_address, customers_firstname, customers_lastname from TABLE_CUSTOMERS order by customers_lastname, customers_firstname, customers_email_address
3
email,newsletters
Dormant Customers (>3months) (Subscribers)
Subscribers who HAVE purchased something, but have NOT purchased for at least three months.
select o.date_purchased, c.customers_email_address, c.customers_lastname, c.customers_firstname from TABLE_CUSTOMERS c, TABLE_ORDERS o WHERE c.customers_id = o.customers_id AND c.customers_newsletter = 1 GROUP BY c.customers_email_address HAVING max(o.date_purchased) <= subdate(now(),INTERVAL 3 MONTH) ORDER BY c.customers_lastname, c.customers_firstname ASC
4
email,newsletters
Active customers in past 3 months (Subscribers)
Newsletter subscribers who are also active customers (purchased something) in last 3 months.
select c.customers_email_address, c.customers_lastname, c.customers_firstname from TABLE_CUSTOMERS c, TABLE_ORDERS o where c.customers_newsletter = '1' AND c.customers_id = o.customers_id and o.date_purchased > subdate(now(),INTERVAL 3 MONTH) GROUP BY c.customers_email_address order by c.customers_lastname, c.customers_firstname ASC
5
email,newsletters
Active customers in past 3 months (Regardless of subscription status)
All active customers (purchased something) in last 3 months, ignoring newsletter-subscription status.
select c.customers_email_address, c.customers_lastname, c.customers_firstname from TABLE_CUSTOMERS c, TABLE_ORDERS o WHERE c.customers_id = o.customers_id and o.date_purchased > subdate(now(),INTERVAL 3 MONTH) GROUP BY c.customers_email_address order by c.customers_lastname, c.customers_firstname ASC
8
email,newsletters
Administrator
Just the email account of the current administrator
select 'ADMIN' as customers_firstname, admin_name as customers_lastname, admin_email as customers_email_address from TABLE_ADMIN where admin_id = $SESSION:admin_id
9
email,newsletters
Customers who have never completed a purchase
For sending newsletter to all customers who registered but have never completed a purchase
SELECT DISTINCT c.customers_email_address as customers_email_address, c.customers_lastname as customers_lastname, c.customers_firstname as customers_firstname FROM TABLE_CUSTOMERS c LEFT JOIN TABLE_ORDERS o ON c.customers_id=o.customers_id WHERE o.date_purchased IS NULL