Patent Document ID: 8447771
Application ID: 11602537

Base Claim:
1. A method for generating queries for at least one of retrieving data that satisfy a conditional expression from a database and performing a calculation on at least part of the retrieved data, the method comprising: receiving, at one or more computer systems, a first query containing at least one first conditional expression; determining, with one or more processors associated with the one or more computer systems, a first replaceable token and a second replaceable token in the first query; retrieving, with the one or more processors associated with the one or more computer systems, a parameter definition for a first instance of a parameter corresponding to the first replaceable token in the first query from a pool of parameter definitions that exist outside of a report or query that includes the first query; verifying that the at least one first conditional expression in the query references the parameter having the persistent parameter definition; in response to the at least one first conditional expression referencing the parameter having the persistent parameter definition, obtaining user input for a first instance of the parameter and user input for a second instance of the parameter based on the persistent parameter definition, wherein obtaining user input comprises: generating, with the one or more processors associated with the one or more computer systems, a first graphical user interface in response to processing the first query based on the parameter definition for the first instance of the parameter corresponding to the first replaceable token identified in the first query, the parameter definition including information configured to prompt users for information indicative of a conditional expression and a calculation, wherein the first graphical user interface is sent and displayed to a user as a prompt for first information indicative of a second conditional expression and a first calculation; receiving first user input from a user, wherein the first user input comprises the second conditional expression and first calculation; generating, with the one or more processors associated with the one or more computer systems, a second graphical user interface in response to processing the first query based on reusing the parameter definition for the second instance of the parameter corresponding to the second replaceable token identified in the first query, wherein the second graphical user interface is sent and displayed to a user as a prompt for second information indicative of a third conditional expression and a second calculation; receiving second user input from a user, wherein the second user input comprises the third conditional expression and second calculation; replacing the first replaceable token with the second conditional expression and the first calculation and replacing the second token with the third conditional expression and the second calculation; in response to replacing the first replaceable token identified in the first query with the second conditional expression and the first calculation and the second replaceable token identified in the first query with the third conditional expression and the second calculation, performing generation of a second query for retrieving data that satisfy the at least one first conditional expression; retrieving data that satisfies the at least one first conditional expression, wherein retrieving data that satisfies the at least one first conditional expression comprises evaluating the second conditional expression and the third conditional expression; and performing the first calculation and the second calculation on the retrieved data.

---

Claim 6:
6. The method of claim 1 further comprising: validating, with the one or more processors associated with the one or more computer systems, that the second conditional expression and the first calculation input by the user or the third conditional expression and the second calculation input by the user meets predefined criteria.