1. A method for processing queries, comprising the computer-implemented steps of: a database server receiving a query, wherein said query comprises: a first one or more clauses; and a model clause, wherein said model clause comprises: a rule that comprises a left-side expression and a right-side expression, wherein said right-side expression includes a window function; and said database server executing said query to generate a relation.