On 2017/01/25 6:15 PM, Simon Slavin wrote:
On 25 Jan 2017, at 4:14pm, R Smith wrote:
Maybe I'm misunderstanding some fundamental principle, but I don't see how
TOTAL(count) is equivalent to TOTAL(*)? COUNT(some_field_name) and COUNT(*)
might be equivalent, but I'm
On 25 Jan 2017, at 4:14pm, R Smith wrote:
> Maybe I'm misunderstanding some fundamental principle, but I don't see how
> TOTAL(count) is equivalent to TOTAL(*)? COUNT(some_field_name) and COUNT(*)
> might be equivalent, but I'm wondering how total would know which column
On 2017/01/25 1:36 PM, Simon Slavin wrote:
On 25 Jan 2017, at 5:13am, Jeffrey Mattox wrote:
(1) SELECT TOTAL(count) as grandTotalCount FROM History
Please try replacing TOTAL(count) with TOTAL(*). Nothing to do with your
question but it may lead to faster results with
On 25 Jan 2017, at 5:13am, Jeffrey Mattox wrote:
> (1) SELECT TOTAL(count) as grandTotalCount FROM History
Please try replacing TOTAL(count) with TOTAL(*). Nothing to do with your
question but it may lead to faster results with less processing.
Simon.
Jeffrey Mattox wrote:
> Can (1) and (3) be combined to return grandTotalCount and
> largestSubTotalCount?
In the general case, you can combine them in two columns:
SELECT (SELECT ...) AS grandTotalCount, (SELECT ...) AS largestSubTotalCount;
or in two rows:
SELECT ...
UNION ALL
SELECT
On 2017/01/25 7:13 AM, Jeffrey Mattox wrote:
I use this query to get a grand total of a number of counts:
(1) SELECT TOTAL(count) as grandTotalCount FROM History
Next, I step through the counts, grouped by column 'hour:
(2a) SELECT TOTAL(count) as subTotalCount, hour FROM History
I use this query to get a grand total of a number of counts:
(1) SELECT TOTAL(count) as grandTotalCount FROM History
Next, I step through the counts, grouped by column 'hour:
(2a) SELECT TOTAL(count) as subTotalCount, hour FROM History GROUP BY hour
I use grandTotalCount in the loop to
7 matches
Mail list logo