From a938e65315339d3b33962d41a52971eb437fc783 Mon Sep 17 00:00:00 2001 From: sahner Date: Wed, 24 Jun 2015 08:24:07 -0500 Subject: [PATCH] minor fixes to TimeseriesQuery and Aggregations --- docs/content/querying/aggregations.md | 6 +++--- docs/content/querying/timeseriesquery.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/content/querying/aggregations.md b/docs/content/querying/aggregations.md index 71ec7c0f514..4c487f4fda5 100644 --- a/docs/content/querying/aggregations.md +++ b/docs/content/querying/aggregations.md @@ -92,7 +92,7 @@ All JavaScript functions must return numerical values. ```json { "type": "javascript", - "name": "sum(log(x)/y) + 10", + "name": "sum(log(x)*y) + 10", "fieldNames": ["x", "y"], "fnAggregate" : "function(current, a, b) { return current + (Math.log(a) * b); }", "fnCombine" : "function(partialA, partialB) { return partialA + partialB; }", @@ -137,11 +137,11 @@ SELECT COUNT(DISTINCT(value)) FROM ( #### Cardinality by row -When setting `byRow` to `true` it computes the cardinality by row, i.e. the cardinality of distinct dimension combinations +When setting `byRow` to `true` it computes the cardinality by row, i.e. the cardinality of distinct dimension combinations. This is equivalent to something akin to ```sql -SELECT COUNT(*) FROM ( SELECT DIM1, DIM2, DIM3 FROM GROUP BY DIM1, DIM2, DIM3 +SELECT COUNT(*) FROM ( SELECT DIM1, DIM2, DIM3 FROM GROUP BY DIM1, DIM2, DIM3 ) ``` **Example** diff --git a/docs/content/querying/timeseriesquery.md b/docs/content/querying/timeseriesquery.md index d7c2616a657..76a5005ba71 100644 --- a/docs/content/querying/timeseriesquery.md +++ b/docs/content/querying/timeseriesquery.md @@ -56,7 +56,7 @@ There are 7 main parts to a timeseries query: |postAggregations|See [Post Aggregations](../querying/post-aggregations.html)|no| |context|See [Context](../querying/query-context.html)|no| -To pull it all together, the above query would return 2 data points, one for each day between 2012-01-01 and 2012-01-03, from the "sample\_datasource" table. Each data point would be the (long) sum of sample\_fieldName1, the (double) sum of sample\_fieldName2 and the (double) the result of sample\_fieldName1 divided by sample\_fieldName2 for the filter set. The output looks like this: +To pull it all together, the above query would return 2 data points, one for each day between 2012-01-01 and 2012-01-03, from the "sample\_datasource" table. Each data point would be the (long) sum of sample\_fieldName1, the (double) sum of sample\_fieldName2 and the (double) result of sample\_fieldName1 divided by sample\_fieldName2 for the filter set. The output looks like this: ```json [