1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
|
<!DOCTYPE html>
<html><head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link href="../sqlite.css" rel="stylesheet">
<title>SQLite Syntax: aggregate-function-invocation</title>
<!-- path=../ -->
</head>
<body>
<div class=nosearch>
<a href="../index.html">
<img class="logo" src="../images/sqlite370_banner.gif" alt="SQLite" border="0">
</a>
<div><!-- IE hack to prevent disappearing logo --></div>
<div class="tagline desktoponly">
Small. Fast. Reliable.<br>Choose any three.
</div>
<div class="menu mainmenu">
<ul>
<li><a href="../index.html">Home</a>
<li class='mobileonly'><a href="javascript:void(0)" onclick='toggle_div("submenu")'>Menu</a>
<li class='wideonly'><a href='../about.html'>About</a>
<li class='desktoponly'><a href="../docs.html">Documentation</a>
<li class='desktoponly'><a href="../download.html">Download</a>
<li class='wideonly'><a href='../copyright.html'>License</a>
<li class='desktoponly'><a href="../support.html">Support</a>
<li class='desktoponly'><a href="../prosupport.html">Purchase</a>
<li class='search' id='search_menubutton'>
<a href="javascript:void(0)" onclick='toggle_search()'>Search</a>
</ul>
</div>
<div class="menu submenu" id="submenu">
<ul>
<li><a href='../about.html'>About</a>
<li><a href='../docs.html'>Documentation</a>
<li><a href='../download.html'>Download</a>
<li><a href='../support.html'>Support</a>
<li><a href='../prosupport.html'>Purchase</a>
</ul>
</div>
<div class="searchmenu" id="searchmenu">
<form method="GET" action="../search">
<select name="s" id="searchtype">
<option value="d">Search Documentation</option>
<option value="c">Search Changelog</option>
</select>
<input type="text" name="q" id="searchbox" value="">
<input type="submit" value="Go">
</form>
</div>
</div>
<script>
function toggle_div(nm) {
var w = document.getElementById(nm);
if( w.style.display=="block" ){
w.style.display = "none";
}else{
w.style.display = "block";
}
}
function toggle_search() {
var w = document.getElementById("searchmenu");
if( w.style.display=="block" ){
w.style.display = "none";
} else {
w.style.display = "block";
setTimeout(function(){
document.getElementById("searchbox").focus()
}, 30);
}
}
function div_off(nm){document.getElementById(nm).style.display="none";}
window.onbeforeunload = function(e){div_off("submenu");}
/* Disable the Search feature if we are not operating from CGI, since */
/* Search is accomplished using CGI and will not work without it. */
if( !location.origin || !location.origin.match || !location.origin.match(/http/) ){
document.getElementById("search_menubutton").style.display = "none";
}
/* Used by the Hide/Show button beside syntax diagrams, to toggle the */
function hideorshow(btn,obj){
var x = document.getElementById(obj);
var b = document.getElementById(btn);
if( x.style.display!='none' ){
x.style.display = 'none';
b.innerHTML='show';
}else{
x.style.display = '';
b.innerHTML='hide';
}
return false;
}
var antiRobot = 0;
function antiRobotGo(){
if( antiRobot!=3 ) return;
antiRobot = 7;
var j = document.getElementById("mtimelink");
if(j && j.hasAttribute("data-href")) j.href=j.getAttribute("data-href");
}
function antiRobotDefense(){
document.body.onmousedown=function(){
antiRobot |= 2;
antiRobotGo();
document.body.onmousedown=null;
}
document.body.onmousemove=function(){
antiRobot |= 2;
antiRobotGo();
document.body.onmousemove=null;
}
setTimeout(function(){
antiRobot |= 1;
antiRobotGo();
}, 100)
antiRobotGo();
}
antiRobotDefense();
</script>
<h1 align='center'>aggregate-function-invocation</h1>
<div class='imgcontainer'>
<div style="max-width:819px"><svg xmlns='http://www.w3.org/2000/svg' class="pikchr" viewBox="0 0 819.533 117.504">
<circle cx="5" cy="56" r="3.6" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<polygon points="32,56 20,60 20,52" style="fill:rgb(0,0,0)"/>
<path d="M9,56L26,56" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<path d="M47,71L156,71A15 15 0 0 0 171 56A15 15 0 0 0 156 41L47,41A15 15 0 0 0 32 56A15 15 0 0 0 47 71Z" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<text x="102" y="56" text-anchor="middle" fill="rgb(0,0,0)" dominant-baseline="central">aggregate-func</text>
<polygon points="189,56 178,60 178,52" style="fill:rgb(0,0,0)"/>
<path d="M171,56L183,56" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<path d="M204,71A15 15 0 0 0 219 56A15 15 0 0 0 204 41A15 15 0 0 0 189 56A15 15 0 0 0 204 71Z" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<text x="204" y="56" text-anchor="middle" font-weight="bold" fill="rgb(0,0,0)" dominant-baseline="central">(</text>
<polygon points="242,56 231,60 231,52" style="fill:rgb(0,0,0)"/>
<path d="M219,56L237,56" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<polygon points="277,26 265,30 265,22" style="fill:rgb(0,0,0)"/>
<path d="M242,56 L 248,56 Q 254,56 254,41 L 254,41 Q 254,26 263,26 L 271,26" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<path d="M292,41L360,41A15 15 0 0 0 376 26L376,26A15 15 0 0 0 360 11L292,11A15 15 0 0 0 277 26L277,26A15 15 0 0 0 292 41Z" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<text x="326" y="26" text-anchor="middle" fill="rgb(0,0,0)" dominant-baseline="central">DISTINCT</text>
<polygon points="394,26 382,30 382,22" style="fill:rgb(0,0,0)"/>
<path d="M376,26L388,26" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<polygon points="428,56 417,60 417,52" style="fill:rgb(0,0,0)"/>
<path d="M394,26 L 399,26 Q 405,26 405,41 L 405,41 Q 405,56 414,56 L 422,56" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<polygon points="464,56 453,60 453,52" style="fill:rgb(0,0,0)"/>
<path d="M428,56L458,56" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<path d="M464,71L513,71L513,41L464,41Z" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<text x="489" y="56" text-anchor="middle" fill="rgb(0,0,0)" dominant-baseline="central">expr</text>
<polygon points="567,56 556,60 556,52" style="fill:rgb(0,0,0)"/>
<path d="M513,56L562,56" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<path d="M582,71A15 15 0 0 0 598 56A15 15 0 0 0 582 41A15 15 0 0 0 567 56A15 15 0 0 0 582 71Z" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<text x="582" y="56" text-anchor="middle" font-weight="bold" fill="rgb(0,0,0)" dominant-baseline="central">)</text>
<polygon points="644,86 632,91 632,82" style="fill:rgb(0,0,0)"/>
<path d="M598,56 L 609,56 Q 621,56 621,71 L 621,71 Q 621,86 629,86 L 638,86" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<path d="M644,101L756,101L756,71L644,71Z" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<text x="700" y="86" text-anchor="middle" fill="rgb(0,0,0)" dominant-baseline="central">filter-clause</text>
<polygon points="810,56 798,60 798,52" style="fill:rgb(0,0,0)"/>
<path d="M756,86 L 765,86 Q 774,86 774,71 L 774,71 Q 774,56 789,56 L 789,56 L 804,56" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<circle cx="813" cy="56" r="3.6" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<polygon points="700,56 688,60 688,52" style="fill:rgb(0,0,0)"/>
<path d="M598,56L694,56" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<polygon points="810,56 798,60 798,52" style="fill:rgb(0,0,0)"/>
<path d="M700,56L804,56" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<polygon points="326,56 315,60 315,52" style="fill:rgb(0,0,0)"/>
<path d="M242,56L321,56" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<polygon points="428,56 417,60 417,52" style="fill:rgb(0,0,0)"/>
<path d="M326,56L422,56" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<path d="M489,32A15 15 0 0 0 504 17A15 15 0 0 0 489 2A15 15 0 0 0 474 17A15 15 0 0 0 489 32Z" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<text x="489" y="17" text-anchor="middle" font-weight="bold" fill="rgb(0,0,0)" dominant-baseline="central">,</text>
<polygon points="504,17 515,12 515,21" style="fill:rgb(0,0,0)"/>
<path d="M513,56 L 525,56 Q 536,56 536,41 L 536,32 Q 536,17 523,17 L 510,17" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<polygon points="464,56 453,60 453,52" style="fill:rgb(0,0,0)"/>
<path d="M474,17 L 456,17 Q 441,17 441,32 L 441,41 Q 441,56 450,56 L 458,56" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<path d="M393,101A15 15 0 0 0 408 86L408,86A15 15 0 0 0 393 71A15 15 0 0 0 378 86L378,86A15 15 0 0 0 393 101Z" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<text x="393" y="86" text-anchor="middle" font-weight="bold" fill="rgb(0,0,0)" dominant-baseline="central">*</text>
<polygon points="378,86 367,91 367,82" style="fill:rgb(0,0,0)"/>
<path d="M242,56 L 248,56 Q 254,56 254,71 L 254,71 Q 254,86 269,86 L 357,86 L 372,86" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<polygon points="489,86 477,91 477,82" style="fill:rgb(0,0,0)"/>
<path d="M408,86L483,86" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<path d="M489,86 L 525,86 Q 540,86 540,71 L 540,71 Q 540,56 546,56 L 552,56" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<polygon points="393,111 382,115 382,106" style="fill:rgb(0,0,0)"/>
<path d="M326,86 L 332,86 Q 338,86 338,98 Q 338,111 353,111 L 373,111 L 388,111" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
<path d="M393,111 L 414,111 Q 429,111 429,98 Q 429,86 435,86 L 441,86" style="fill:none;stroke-width:2.16;stroke:rgb(0,0,0);" />
</svg>
</div><br>
<br></br>
References: <a href='./expr.html'>expr</a> <a href='./filter-clause.html'>filter-clause</a><br></br>
See also: <a href='../lang_aggfunc.html'>lang_aggfunc.html</a> <a href='../lang_expr.html'>lang_expr.html</a>
</div>
|