Apparatus and method for constructing complex database query statements based on business analysis comparators
A computer readable medium includes executable instructions to construct a database query based on a comparator. Executable instructions accept a comparator forming a part of a text question. A value that defines a subject within a text question is received. A structured database query is built based upon the comparator and the subject of the text question.
1 . A computer readable medium including executable instructions to construct a database query based on a comparator, including executable instructions to:
accept a comparator forming a part of a text question;
receive a value that defines a subject within said text question; and
build a structured database query based upon said comparator and said subject of said text question.
2 . The computer readable medium of claim 1 wherein said executable instructions to accept a comparator include executable instructions to accept a comparator value selected from: lapsed, new, bottom, bottom percent, top, top percent, above average, average, below average, decreased, increased, and unchanged.
3 . The computer readable medium of claim 1 wherein said executable instructions to accept a comparator include executable instructions to accept a comparator parameter selected from: date objects, date ranges, measures, behaviors, and subject attributes.
4 . The computer readable medium of claim 1 further comprising executable instructions to combine the logic of two comparators.
5 . The computer readable medium of claim 1 further comprising executable instructions to utilize said comparator to sort data in accordance with an expression.
6 . The computer readable medium of claim 1 wherein said executable instructions to build a structured database query include executable instructions to build a structured query language (SQL) database query.
7 . A computer readable medium including executable instructions to construct a database query based on a comparator, including executable instructions to:
process a text question to identify a comparative expression within said text question;
associate said comparative expression with the subject of said text question; and
select a comparator based upon said subject and said comparative expression.
8 . The computer readable medium of claim 7 further comprising executable instructions to form an abstract database query based upon said comparator.
9 . The computer readable medium of claim 8 further comprising executable instructions to select a query converter based upon said abstract database query.
10 . The computer readable medium of claim 9 wherein said query converter includes executable instructions to generate a database language query.
11 . The computer readable medium of claim 10 further comprising executable instructions to apply said database language query to a database to produce database results.
12 . The computer readable medium of claim 11 further comprising executable instructions to deliver said database results to an application program that generated said text question.