Querying Agency Default Commissions

A QueryPlus user wanted to be able to easily find the Writing Company with the highest default Agency Commission for a prospective Customer. Here's how to find this information through QueryPlus:

1.  Start a new query and choose the Basic Information Module, then Fields.

2.  Set the drop-boxes as shown.

      

 3.  Choose from the fields in the Available Fields list. Remember that it isn't possible to mix fields from different Components in the Stand-Alone Tables System. A typical query would look something like this:

     

4.  Filtering is important, because the number of records can be huge: It is possible (although not likely) to have a different default commission for every Writing Company, LOB, Plan Type AND Transaction Type. In the Daily Querier's test database, there are 679 Writing Companies, 181 LOBs, 26 Transaction Types and 162 Plan Types, yielding a possible (if improbable) total number of records of..... 679 x 181 x 26 x 162 = 517,650,588..... so give your filters some thought.

Usually, a filter on a particular Line of Business will yield the best results, and perhaps a particular Transaction Type. For instance, an LOB of HOME and Tran Type of NBS will give you all of the Writing Companies that DO have a default Agency Commission for that combination. Keep in mind that filtering on both LOB and Tran Type will only return records where BOTH exist. That means that any Writing Company that has a default Agency Commission for HOME, but not for HOME and NBS in the same record, will be excluded by this query.

To further restrict the listings for a particular set of records, set the Top X filter in QueryPlus to pull only the Top 10 or Top 20, to only see the best deals.

5.  The best way to learn about this query is to experiment with it - run it and observe the dataset to refine your fields and/or filters.


Permalink | Comments (0) | Post RSSRSS comment feed