1. A computer-implemented method for transforming a query, comprising:
generating a transformed query for the query, wherein:
the query includes an outer query that has (1) a GROUP BY clause and (2) a HAVING clause that contains a subquery;
the outer query includes a first set of one or more join operations;
the subquery includes a second set of one or more join operations;
all join operations in the second set of one or more join operations are included in the first set of one or more join operations;
any join operations that are in the first set of one or more join operations and not in the second set of one or more join operations are lossless; and
at least one of the outer query and the subquery computes an algebraic aggregate function;
wherein generating the transformed query comprises the steps of:
eliminating the subquery;
creating an inline view, wherein the inline view:
includes a set of join operations that is equivalent to the first set of join operations;
includes a GROUP BY clause that is equivalent to the GROUP BY clause in the outer query;
computes an algebraic aggregate window function that computes an algebraic aggregate function over a range;
creating a predicate in the outer query that references the inline view.
2. The method of claim 1, wherein both the outer query and the subquery computes an algebraic aggregate function.
3. The method of claim 1, wherein:
the GROUP BY clause in the outer query is a first GROUP BY clause that references one or more columns;
the subquery includes a second GROUP BY clause that references one or more columns;
the one or more columns referenced in the first GROUP BY clause includes the one or more columns referenced in the second GROUP BY clause;
generating the transformed query further comprises the steps of:
creating a second inline view;
wherein:
the inline view is a first inline view;
the first inline view is nested within the second inline view;
the algebraic aggregate window function includes a partition-by clause that references the one or more columns references in the second GROUP BY clause;
the predicate in the outer query that references the first inline view also references the second inline view.
4. The method of claim 3, wherein:
the HAVING clause specifies that an ANY function be applied to the subquery;
the second inline view includes a MIN function that references the algebraic aggregate window function; and
the predicate in the outer query references an output of the MIN function.
5. The method of claim 4, wherein:
the HAVING clause specifies that an expression be greater than the ANY function;
the predicate in the outer query specifies that the expression be greater than a value that is based on the output of the MIN function.
6. The method of claim 4, wherein:
the HAVING clause specifies that an expression be less than the ANY function;
the predicate in the outer query specifies that the expression be less than a value that is based on the output of the MIN function.
7. The method of claim 3, wherein:
the HAVING clause specifies that an ALL function be applied to the subquery;
the second inline view includes a MAX function that references the algebraic aggregate window function; and
the predicate in the outer query references an output of the MAX function.
8. The method of claim 7, wherein:
the HAVING clause specifies that an expression be greater than the ALL function;
the predicate in the outer query specifies that the expression be greater than a value that is based on the output of the MIN function.
9. The method of claim 7, wherein:
the HAVING clause specifies that an expression be less than the ALL function;
the predicate in the outer query specifies that the expression be less than a value that is based on the output of the MAX function.
10. The method of claim 7, wherein:
the HAVING clause specifies that an expression be equal to the ALL function;
the second inline view includes a MIN function that references the algebraic aggregate window function;
the predicate in the outer query specifies that the expression be equal to a value that is based on the output of the MAX function and equal to a value that is based on the output of the MIN function.
11. The method of claim 3, wherein:
the HAVING clause specifies that an ANY function be applied to the subquery;
the HAVING clause specifies that an expression be equal to the ANY function;
the second inline view includes a COUNT function,
wherein the COUNT function counts how many rows in a set of results for the subquery are equal to the expression; and
the predicate in the outer query references the output of the COUNT function.
12. A computer-readable storage medium storing instructions, the instructions including instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of:
generating a transformed query for the query, wherein:
the query includes an outer query that has (1) a GROUP BY clause and (2) a HAVING clause that contains a subquery;
the outer query includes a first set of one or more join operations;
the subquery includes a second set of one or more join operations;
all join operations in the second set of one or more join operations are included in the first set of one or more join operations;
any join operations that are in the first set of one or more join operations and not in the second set of one or more join operations are lossless; and
at least one of the outer query and the subquery computes an algebraic aggregate function;
wherein generating the transformed query comprises the steps of:
eliminating the subquery;
creating an inline view, wherein the inline view:
includes a set of join operations that is equivalent to the first set of join operations;
includes a GROUP BY clause that is equivalent to the GROUP BY clause in the outer query;
computes an algebraic aggregate window function that computes an algebraic aggregate function over a range;
creating a predicate in the outer query that references the inline view.
13. The computer-readable storage medium of claim 12, wherein both the outer query and the subquery computes an algebraic aggregate function.
14. The computer-readable storage medium of claim 12, wherein:
the GROUP BY clause in the outer query is a first GROUP BY clause that references one or more columns;
the subquery includes a second GROUP BY clause that references one or more columns;
the one or more columns referenced in the first GROUP BY clause includes the one or more columns referenced in the second GROUP BY clause;
instructions for generating the transformed query further comprises instructions for:
creating a second inline view;
wherein:
the inline view is a first inline view;
the first inline view is nested within the second inline view;
the algebraic aggregate window function includes a partition-by clause that references the one or more columns references in the second GROUP BY clause;
the predicate in the outer query that references the first inline view also references the second inline view.
15. The computer-readable storage medium of claim 14, wherein:
the HAVING clause specifies that an ANY function be applied to the subquery;
the second inline view includes a MIN function that references the algebraic aggregate window function; and
the predicate in the outer query references an output of the MIN function.
16. The computer-readable storage medium of claim 15, wherein:
the HAVING clause specifies that an expression be greater than the ANY function;
the predicate in the outer query specifies that the expression be greater than a value that is based on the output of the MIN function.
17. The computer-readable storage medium of claim 15, wherein:
the HAVING clause specifies that an expression be less than the ANY function;
the predicate in the outer query specifies that the expression be less than a value that is based on the output of the MIN function.
18. The computer-readable storage medium of claim 14, wherein:
the HAVING clause specifies that an ALL function be applied to the subquery;
the second inline view includes a MAX function that references the algebraic aggregate window function; and
the predicate in the outer query references an output of the MAX function.
19. The computer-readable storage medium of claim 18, wherein:
the HAVING clause specifies that an expression be greater than the ALL function;
the predicate in the outer query specifies that the expression be greater than a value that is based on the output of the MIN function.
20. The computer-readable storage medium of claim 18, wherein:
the HAVING clause specifies that an expression be less than the ALL function;
the predicate in the outer query specifies that the expression be less than a value that is based on the output of the MAX function.
21. The computer-readable storage medium of claim 18, wherein:
the HAVING clause specifies that an expression be equal to the ALL function;
the second inline view includes a MIN function that references the algebraic aggregate window function;
the predicate in the outer query specifies that the expression be equal to a value that is based on the output of the MAX function and equal to a value that is based on the output of the MIN function.
22. The computer-readable storage medium of claim 14, wherein:
the HAVING clause specifies that an ANY function be applied to the subquery;
the HAVING clause specifies that an expression be equal to the ANY function;
the second inline view includes a COUNT function,
wherein the COUNT function counts how many rows in a set of results for the subquery are equal to the expression; and
the predicate in the outer query references the output of the COUNT function.
The claims below are in addition to those above.
All refrences to claim(s) which appear below refer to the numbering after this setence.
What is claimed is:
1. An air induction system comprising:
an air induction body having a mouth;
a speaker operatively connected to said air induction body;
a microphone operatively connected to said air induction body by a rigid support; and
a control unit in communication with said speaker and said microphone.
2. The air induction system of claim 1, wherein said microphone is operatively connected to said mouth.
3. The air induction system of claim 1, wherein a flex cable communicates with said speaker.
4. The air induction system of claim 1, wherein said rigid support is plastic.
5. The air induction system of claim 1, including a screen spanning at least a portion of said mouth.
6. The air induction system of claim 1, wherein said rigid support comprises at least one leg operatively connecting said microphone to said air induction body.
7. The air induction system of claim 6, wherein said rigid support comprises a plurality of legs radially extending from said microphone and operatively connecting said microphone to said air induction body.
8. The air induction system of claim 6, wherein a circumferentially extending ring connects said plurality of legs.
9. The air induction system of claim 8, wherein a screen is draped on said legs and said ring.
10. An air induction system comprising:
an air induction body, having a mouth;
a speaker operatively connected to said air induction body, having a face;
a microphone operatively connected to said air induction body by a support extending over only a portion of said face; and
a control unit in communication with said speaker and said microphone.
11. The air induction system of claim 10, wherein said microphone is operatively connected to said mouth.
12. The air induction system of claim 10, wherein a flex cable communicates with said speaker.
13. The air induction system of claim 10, wherein said support is plastic.
14. The air induction system of claim 10, including a screen spanning at least a portion of said mouth.
15. The air induction system of claim 10, wherein said support comprises at least one leg operatively connecting said microphone to said air induction body.
16. The air induction system of claim 15, wherein said support comprises a plurality of legs radially extending from said microphone and operatively connecting said microphone to said air induction body.
17. The air induction system of claim 10, wherein a circumferentially extending ring connects said plurality of legs.
18. The air induction system of claim 17, wherein a screen is draped on said legs and said ring.
19. An air induction system comprising:
an air induction body, having a mouth;
a speaker operatively connected to said air induction body, having a face;
a microphone operatively connected to said air induction body by a support spaced a predetermined distance from said face wherein said predetermined distance relates to the location of the sound field emitted by said speaker; and
a control unit in communication with said speaker and said microphone.
20. The air induction system of claim 19, wherein said support is designed to be acoustically transparent.