| 1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
| 2 |
<!-- |
| 3 |
Copyright 2004-2023 H2 Group. Multiple-Licensed under the MPL 2.0, |
| 4 |
and the EPL 1.0 (https://h2database.com/html/license.html). |
| 5 |
Initial Developer: H2 Group |
| 6 |
--> |
| 7 |
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> |
| 8 |
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> |
| 9 |
<meta name="viewport" content="width=device-width, initial-scale=1" /> |
| 10 |
<title> |
| 11 |
Aggregate Functions |
| 12 |
</title> |
| 13 |
<link rel="stylesheet" type="text/css" href="stylesheet.css" /> |
| 14 |
<!-- [search] { --> |
| 15 |
<script type="text/javascript" src="navigation.js"></script> |
| 16 |
</head><body onload="frameMe();"> |
| 17 |
<table class="content"><tr class="content"><td class="content"><div class="contentDiv"> |
| 18 |
<!-- } --> |
| 19 |
|
| 20 |
<h1>Aggregate Functions</h1> |
| 21 |
<h2 id="functions_aggregate_index">Index</h2> |
| 22 |
<h3>General Aggregate Functions</h3> |
| 23 |
<!-- syntax-start |
| 24 |
<p class="notranslate"> |
| 25 |
<c:forEach var="item" items="aggregateFunctionsGeneral"> |
| 26 |
<a href="#${item.link}" >${item.topic}</a><br /> |
| 27 |
</c:forEach> |
| 28 |
</p> |
| 29 |
syntax-end --> |
| 30 |
<!-- railroad-start --> |
| 31 |
<table class="notranslate index"> |
| 32 |
<tr> |
| 33 |
<td class="index"> |
| 34 |
<c:forEach var="item" items="aggregateFunctionsGeneral-0"> |
| 35 |
<a href="#${item.link}" >${item.topic}</a><br /> |
| 36 |
</c:forEach> |
| 37 |
</td><td class="index"> |
| 38 |
<c:forEach var="item" items="aggregateFunctionsGeneral-1"> |
| 39 |
<a href="#${item.link}" >${item.topic}</a><br /> |
| 40 |
</c:forEach> |
| 41 |
</td><td class="index"> |
| 42 |
<c:forEach var="item" items="aggregateFunctionsGeneral-2"> |
| 43 |
<a href="#${item.link}" >${item.topic}</a><br /> |
| 44 |
</c:forEach> |
| 45 |
</td> |
| 46 |
</tr> |
| 47 |
</table> |
| 48 |
<!-- railroad-end --> |
| 49 |
|
| 50 |
<h3>Binary Set Functions</h3> |
| 51 |
<!-- syntax-start |
| 52 |
<p class="notranslate"> |
| 53 |
<c:forEach var="item" items="aggregateFunctionsBinarySet"> |
| 54 |
<a href="#${item.link}" >${item.topic}</a><br /> |
| 55 |
</c:forEach> |
| 56 |
</p> |
| 57 |
syntax-end --> |
| 58 |
<!-- railroad-start --> |
| 59 |
<table class="notranslate index"> |
| 60 |
<tr> |
| 61 |
<td class="index"> |
| 62 |
<c:forEach var="item" items="aggregateFunctionsBinarySet-0"> |
| 63 |
<a href="#${item.link}" >${item.topic}</a><br /> |
| 64 |
</c:forEach> |
| 65 |
</td><td class="index"> |
| 66 |
<c:forEach var="item" items="aggregateFunctionsBinarySet-1"> |
| 67 |
<a href="#${item.link}" >${item.topic}</a><br /> |
| 68 |
</c:forEach> |
| 69 |
</td><td class="index"> |
| 70 |
<c:forEach var="item" items="aggregateFunctionsBinarySet-2"> |
| 71 |
<a href="#${item.link}" >${item.topic}</a><br /> |
| 72 |
</c:forEach> |
| 73 |
</td> |
| 74 |
</tr> |
| 75 |
</table> |
| 76 |
<!-- railroad-end --> |
| 77 |
|
| 78 |
<h3>Ordered Aggregate Functions</h3> |
| 79 |
<!-- syntax-start |
| 80 |
<p class="notranslate"> |
| 81 |
<c:forEach var="item" items="aggregateFunctionsOrdered"> |
| 82 |
<a href="#${item.link}" >${item.topic}</a><br /> |
| 83 |
</c:forEach> |
| 84 |
</p> |
| 85 |
syntax-end --> |
| 86 |
<!-- railroad-start --> |
| 87 |
<table class="notranslate index"> |
| 88 |
<tr> |
| 89 |
<td class="index"> |
| 90 |
<c:forEach var="item" items="aggregateFunctionsOrdered-0"> |
| 91 |
<a href="#${item.link}" >${item.topic}</a><br /> |
| 92 |
</c:forEach> |
| 93 |
</td><td class="index"> |
| 94 |
<c:forEach var="item" items="aggregateFunctionsOrdered-1"> |
| 95 |
<a href="#${item.link}" >${item.topic}</a><br /> |
| 96 |
</c:forEach> |
| 97 |
</td><td class="index"> |
| 98 |
<c:forEach var="item" items="aggregateFunctionsOrdered-2"> |
| 99 |
<a href="#${item.link}" >${item.topic}</a><br /> |
| 100 |
</c:forEach> |
| 101 |
</td> |
| 102 |
</tr> |
| 103 |
</table> |
| 104 |
<!-- railroad-end --> |
| 105 |
|
| 106 |
<h3>Hypothetical Set Functions</h3> |
| 107 |
<!-- syntax-start |
| 108 |
<p class="notranslate"> |
| 109 |
<c:forEach var="item" items="aggregateFunctionsHypothetical"> |
| 110 |
<a href="#${item.link}" >${item.topic}</a><br /> |
| 111 |
</c:forEach> |
| 112 |
</p> |
| 113 |
syntax-end --> |
| 114 |
<!-- railroad-start --> |
| 115 |
<table class="notranslate index"> |
| 116 |
<tr> |
| 117 |
<td class="index"> |
| 118 |
<c:forEach var="item" items="aggregateFunctionsHypothetical-0"> |
| 119 |
<a href="#${item.link}" >${item.topic}</a><br /> |
| 120 |
</c:forEach> |
| 121 |
</td><td class="index"> |
| 122 |
<c:forEach var="item" items="aggregateFunctionsHypothetical-1"> |
| 123 |
<a href="#${item.link}" >${item.topic}</a><br /> |
| 124 |
</c:forEach> |
| 125 |
</td><td class="index"> |
| 126 |
<c:forEach var="item" items="aggregateFunctionsHypothetical-2"> |
| 127 |
<a href="#${item.link}" >${item.topic}</a><br /> |
| 128 |
</c:forEach> |
| 129 |
</td> |
| 130 |
</tr> |
| 131 |
</table> |
| 132 |
<!-- railroad-end --> |
| 133 |
|
| 134 |
<h3>Inverse Distribution Functions</h3> |
| 135 |
<!-- syntax-start |
| 136 |
<p class="notranslate"> |
| 137 |
<c:forEach var="item" items="aggregateFunctionsInverse"> |
| 138 |
<a href="#${item.link}" >${item.topic}</a><br /> |
| 139 |
</c:forEach> |
| 140 |
</p> |
| 141 |
syntax-end --> |
| 142 |
<!-- railroad-start --> |
| 143 |
<table class="notranslate index"> |
| 144 |
<tr> |
| 145 |
<td class="index"> |
| 146 |
<c:forEach var="item" items="aggregateFunctionsInverse-0"> |
| 147 |
<a href="#${item.link}" >${item.topic}</a><br /> |
| 148 |
</c:forEach> |
| 149 |
</td><td class="index"> |
| 150 |
<c:forEach var="item" items="aggregateFunctionsInverse-1"> |
| 151 |
<a href="#${item.link}" >${item.topic}</a><br /> |
| 152 |
</c:forEach> |
| 153 |
</td><td class="index"> |
| 154 |
<c:forEach var="item" items="aggregateFunctionsInverse-2"> |
| 155 |
<a href="#${item.link}" >${item.topic}</a><br /> |
| 156 |
</c:forEach> |
| 157 |
</td> |
| 158 |
</tr> |
| 159 |
</table> |
| 160 |
<!-- railroad-end --> |
| 161 |
|
| 162 |
<h3>JSON Aggregate Functions</h3> |
| 163 |
<!-- syntax-start |
| 164 |
<p class="notranslate"> |
| 165 |
<c:forEach var="item" items="aggregateFunctionsJSON"> |
| 166 |
<a href="#${item.link}" >${item.topic}</a><br /> |
| 167 |
</c:forEach> |
| 168 |
</p> |
| 169 |
syntax-end --> |
| 170 |
<!-- railroad-start --> |
| 171 |
<table class="notranslate index"> |
| 172 |
<tr> |
| 173 |
<td class="index"> |
| 174 |
<c:forEach var="item" items="aggregateFunctionsJSON-0"> |
| 175 |
<a href="#${item.link}" >${item.topic}</a><br /> |
| 176 |
</c:forEach> |
| 177 |
</td><td class="index"> |
| 178 |
<c:forEach var="item" items="aggregateFunctionsJSON-1"> |
| 179 |
<a href="#${item.link}" >${item.topic}</a><br /> |
| 180 |
</c:forEach> |
| 181 |
</td><td class="index"> |
| 182 |
<c:forEach var="item" items="aggregateFunctionsJSON-2"> |
| 183 |
<a href="#${item.link}" >${item.topic}</a><br /> |
| 184 |
</c:forEach> |
| 185 |
</td> |
| 186 |
</tr> |
| 187 |
</table> |
| 188 |
<!-- railroad-end --> |
| 189 |
|
| 190 |
<h2>Details</h2> |
| 191 |
<!-- railroad-start --> |
| 192 |
<p>Click on the header of the function to switch between railroad diagram and BNF.</p> |
| 193 |
<!-- railroad-end --> |
| 194 |
<p>Non-standard syntax is marked in green. Compatibility-only non-standard syntax is marked in red, |
| 195 |
don't use it unless you need it for compatibility with other databases or old versions of H2.</p> |
| 196 |
|
| 197 |
<h2>General Aggregate Functions</h2> |
| 198 |
<c:forEach var="item" items="aggregateFunctionsGeneral"> |
| 199 |
<h3 id="${item.link}" class="notranslate" onclick="switchBnf(this)">${item.topic}</h3> |
| 200 |
<!-- railroad-start --> |
| 201 |
<pre name="bnf" style="display: none"> |
| 202 |
${item.syntax} |
| 203 |
</pre> |
| 204 |
<div name="railroad"> |
| 205 |
${item.railroad} |
| 206 |
</div> |
| 207 |
<!-- railroad-end --> |
| 208 |
<!-- syntax-start |
| 209 |
<pre> |
| 210 |
${item.syntax} |
| 211 |
</pre> |
| 212 |
syntax-end --> |
| 213 |
<p>${item.text}</p> |
| 214 |
<p>Example:</p> |
| 215 |
<p class="notranslate">${item.example}</p> |
| 216 |
</c:forEach> |
| 217 |
|
| 218 |
<h2>Binary Set Functions</h2> |
| 219 |
<c:forEach var="item" items="aggregateFunctionsBinarySet"> |
| 220 |
<h3 id="${item.link}" class="notranslate" onclick="switchBnf(this)">${item.topic}</h3> |
| 221 |
<!-- railroad-start --> |
| 222 |
<pre name="bnf" style="display: none"> |
| 223 |
${item.syntax} |
| 224 |
</pre> |
| 225 |
<div name="railroad"> |
| 226 |
${item.railroad} |
| 227 |
</div> |
| 228 |
<!-- railroad-end --> |
| 229 |
<!-- syntax-start |
| 230 |
<pre> |
| 231 |
${item.syntax} |
| 232 |
</pre> |
| 233 |
syntax-end --> |
| 234 |
<p>${item.text}</p> |
| 235 |
<p>Example:</p> |
| 236 |
<p class="notranslate">${item.example}</p> |
| 237 |
</c:forEach> |
| 238 |
|
| 239 |
<h2>Ordered Aggregate Functions</h2> |
| 240 |
<c:forEach var="item" items="aggregateFunctionsOrdered"> |
| 241 |
<h3 id="${item.link}" class="notranslate" onclick="switchBnf(this)">${item.topic}</h3> |
| 242 |
<!-- railroad-start --> |
| 243 |
<pre name="bnf" style="display: none"> |
| 244 |
${item.syntax} |
| 245 |
</pre> |
| 246 |
<div name="railroad"> |
| 247 |
${item.railroad} |
| 248 |
</div> |
| 249 |
<!-- railroad-end --> |
| 250 |
<!-- syntax-start |
| 251 |
<pre> |
| 252 |
${item.syntax} |
| 253 |
</pre> |
| 254 |
syntax-end --> |
| 255 |
<p>${item.text}</p> |
| 256 |
<p>Example:</p> |
| 257 |
<p class="notranslate">${item.example}</p> |
| 258 |
</c:forEach> |
| 259 |
|
| 260 |
<h2>Hypothetical Set Functions</h2> |
| 261 |
<c:forEach var="item" items="aggregateFunctionsHypothetical"> |
| 262 |
<h3 id="${item.link}" class="notranslate" onclick="switchBnf(this)">${item.topic}</h3> |
| 263 |
<!-- railroad-start --> |
| 264 |
<pre name="bnf" style="display: none"> |
| 265 |
${item.syntax} |
| 266 |
</pre> |
| 267 |
<div name="railroad"> |
| 268 |
${item.railroad} |
| 269 |
</div> |
| 270 |
<!-- railroad-end --> |
| 271 |
<!-- syntax-start |
| 272 |
<pre> |
| 273 |
${item.syntax} |
| 274 |
</pre> |
| 275 |
syntax-end --> |
| 276 |
<p>${item.text}</p> |
| 277 |
<p>Example:</p> |
| 278 |
<p class="notranslate">${item.example}</p> |
| 279 |
</c:forEach> |
| 280 |
|
| 281 |
<h2>Inverse Distribution Functions</h2> |
| 282 |
<c:forEach var="item" items="aggregateFunctionsInverse"> |
| 283 |
<h3 id="${item.link}" class="notranslate" onclick="switchBnf(this)">${item.topic}</h3> |
| 284 |
<!-- railroad-start --> |
| 285 |
<pre name="bnf" style="display: none"> |
| 286 |
${item.syntax} |
| 287 |
</pre> |
| 288 |
<div name="railroad"> |
| 289 |
${item.railroad} |
| 290 |
</div> |
| 291 |
<!-- railroad-end --> |
| 292 |
<!-- syntax-start |
| 293 |
<pre> |
| 294 |
${item.syntax} |
| 295 |
</pre> |
| 296 |
syntax-end --> |
| 297 |
<p>${item.text}</p> |
| 298 |
<p>Example:</p> |
| 299 |
<p class="notranslate">${item.example}</p> |
| 300 |
</c:forEach> |
| 301 |
|
| 302 |
<h2>JSON Aggregate Functions</h2> |
| 303 |
<c:forEach var="item" items="aggregateFunctionsJSON"> |
| 304 |
<h3 id="${item.link}" class="notranslate" onclick="switchBnf(this)">${item.topic}</h3> |
| 305 |
<!-- railroad-start --> |
| 306 |
<pre name="bnf" style="display: none"> |
| 307 |
${item.syntax} |
| 308 |
</pre> |
| 309 |
<div name="railroad"> |
| 310 |
${item.railroad} |
| 311 |
</div> |
| 312 |
<!-- railroad-end --> |
| 313 |
<!-- syntax-start |
| 314 |
<pre> |
| 315 |
${item.syntax} |
| 316 |
</pre> |
| 317 |
syntax-end --> |
| 318 |
<p>${item.text}</p> |
| 319 |
<p>Example:</p> |
| 320 |
<p class="notranslate">${item.example}</p> |
| 321 |
</c:forEach> |
| 322 |
|
| 323 |
<!--[if lte IE 7]><script language="javascript">switchBnf(null);</script><![endif]--> |
| 324 |
|
| 325 |
<!-- [close] { --></div></td></tr></table><!-- } --><!-- analytics --></body></html> |
| 326 |
|