|
|
|
|
|
by alquemist
2076 days ago
|
|
There are a handful of examples on Wikipedia: https://en.wikipedia.org/wiki/QUEL_query_languages. One example: retrieve (a=count(y.i by y.d where y.str = "ii*" or y.str = "foo"), b=max(count(y.i by y.d)))
Not a particularly clear 'jumps at you' obvious semantic:* Are a and b aggregation functions or window functions? If aggregations, how do they compose if the 'by' scopes are different? * What does max(count(... by ...)) mean? What is the aggregation (window?) scope of max? * How would an outer where clause compose? What is the evaluation order? |
|
> count() Number of entries in column
> max() Maximum value in column
> The by clause causes the function to return a set of results, as opposed to a single result. One result is returned for each grouping specified by the by clause. Think of by as meaning "for each."
I assume it evaluates like retrieving set and scalar.
[1] http://docs.huihoo.com/ingres/9.3/QUELRef.pdf