Compute some stats in queries
This commit is contained in:
parent
c8d2f66467
commit
36b69a05e5
@ -6,6 +6,9 @@ dot.templateSettings.strip = false;
|
|||||||
function createTemplate(method) {
|
function createTemplate(method) {
|
||||||
return dot.template([
|
return dot.template([
|
||||||
'SELECT',
|
'SELECT',
|
||||||
|
'min({{=it._column}}) min_val,',
|
||||||
|
'max({{=it._column}}) max_val,',
|
||||||
|
'avg({{=it._column}}) avg_val,',
|
||||||
method,
|
method,
|
||||||
'FROM ({{=it._sql}}) _table_sql WHERE {{=it._column}} IS NOT NULL'
|
'FROM ({{=it._sql}}) _table_sql WHERE {{=it._column}} IS NOT NULL'
|
||||||
].join('\n'));
|
].join('\n'));
|
||||||
|
Loading…
Reference in New Issue
Block a user