Find the right query in Wintix 6

(Last updated on: January 19, 2024)

The following are queries we have collected during the time we have been using MySQL as a back end. Some of them may be helpful to you.

Go to Mailing list | Generate a mailing list | Export email, then click on the Edit the query tab. Copy and paste the one of the codes below, then click Export list.

* How to get a list of patrons in the customer mailing list who have the notify flag check boxes checked

select
customer.first, customer.last, customer.email, customer.notify, customer.notify2, customer.notify3
from customer
where
(customer.notify=1 or customer.notify2=1 or customer.notify3=1) and (customer.email != ”)
order by customer.last, customer.first

Click here to see a screen shot and more info about this report

How to run a report of names entered in the mailing list in Wintix within a certain time frame:

select
customer.last, customer.first, customer.email, customer.entry_date,                                 from customer                                                                                                                                where customer.email != ” and customer.optin_email_list = 1 and entry_date > “2014-01-01?
order by customer.last, customer.first

Read more about how to run this report.

How to generate a mail list of people who don’t have an email address by running a query

select * from customer where email = “”

Read more about this query.

How to generate a mail list of people who bought specific shows and don’t have an email address by running a query

select
customer. *
from mainsale
left join customer on customer.customer_id=mainsale.customer_id
left join master on mainsale.master_id=master.master_id
left join shows on mainsale.shows_id=shows.shows_id

After the end parenthesis, add:   and customer.email = “”
It will look like this:
where mainstale.master_id in(###, ###) and customer.email = “”  The and customer.email = “”  will generate the mailing list for those patrons whose email address is blank in the database.

group by customer.customer_id
order by customer.last, customer.first

Read more about this query.

This entry was posted in Wintix 6 and tagged . Bookmark the permalink.

Leave a Reply