OurTown2000 Query Handbook

<-Back (Creating Reports-Creating a Detail/Summary Report) Table of Contents Next (Appendix B: OT2 Query Reports Variables)->

APPENDIX A: Another AND/OR Example

 

In the following example, we wish to know what combinations of purchases customers have made in a hardware store.  In this way, we can identify cross-selling opportunities.  The customers we will investigate have purchased some combination of hammers, nails and glue.

 

Customers who purchased a hammer.

Customers who purchased nails.

Customers who purchased glue.

 

 

 

 

 

 

Query Condition

Illustration of Outcome

Description of Outcome

 

 

 

Product equals Glue OR Product equals Hammer AND Product equals Nails

Here we have selected all glue or hammer customer who have also purchased nails.

 

 

 

Product equals Glue OR (Product equals Hammer AND Product equals Nails)

Here we have selected those customers who have either glue or a set of hammer and nails.

 

 

 

(Product equals Glue OR Product equals Hammer) AND Product equals Nails

This is the same as the first set of conditions.  We have used brackets to confirm left to right processing.

 

 

 

(Product equals Hammer OR Product equals Nails) AND (Product does not equal Hammer and Product does not equal Nails)

Here we have identified all the customer with either hammer or nails, but not both.

 

 

 

 


<-Back (Creating Reports-Creating a Detail/Summary Report) Table of Contents Next (Appendix B: OT2 Query Reports Variables)->

OurTown2000 Query Handbook