Project: YugabyteDB (App Definition and Development / Database)
File: select,common_table_expression,fn_over_window,ordinary_aggregate_fn_invocation,within_group_aggregate_fn_invocation,grouping_element,order_expr.diagram.md

<svg class="rrdiagram" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink"

width="1090" height="1245" viewbox="0 0 1090 1245"><path class="connector" d="M0 52h35m53 0h30m90 0h20m-125 0q5 0 5 5v8q0 5 5 5h100q5 0 5-5v-8q0-5 5-5m5 0h30m-5 0q-5 0-5-5v-20q0-5 5-5h83m24 0h83q5 0 5 5v20q0 5-5 5m-5 0h40m-458 0q5 0 5 5v23q0 5 5 5h433q5 0 5-5v-23q0-5 5-5m5 0h7m2 0h2m2 0h2m-493 65h2m2 0h2m2 0h7m66 0h30m42 0h347m-399 55q0 5 5 5h5m78 0h30m38 0h10m25 0h30m-5 0q-5 0-5-5v-20q0-5 5-5h34m24 0h35q5 0 5 5v20q0 5-5 5m-5 0h30m25 0h20m-276 0q5 0 5 5v8q0 5 5 5h251q5 0 5-5v-8q0-5 5-5m5 0h5q5 0 5-5m-394-55q5 0 5 5v78q0 5 5 5h379q5 0 5-5v-78q0-5 5-5m5 0h30m28 0h517m-555 55q0 5 5 5h25m-5 0q-5 0-5-5v-20q0-5 5-5h235m24 0h236q5 0 5 5v20q0 5-5 5m-490 0h20m83 0h192m-285 25q0 5 5 5h5m119 0h141q5 0 5-5m-275 30q0 5 5 5h5m225 0h35q5 0 5-5m-280-55q5 0 5 5v80q0 5 5 5h5m255 0h5q5 0 5-5v-80q0-5 5-5m5 0h50m36 0h20m-71 0q5 0 5 5v8q0 5 5 5h46q5 0 5-5v-8q0-5 5-5m5 0h10m54 0h20m-175 0q5 0 5 5v23q0 5 5 5h150q5 0 5-5v-23q0-5 5-5m5 0h25q5 0 5-5m-550-55q5 0 5 5v153q0 5 5 5h535q5 0 5-5v-153q0-5 5-5m5 0h7m2 0h2m2 0h2m-1090 220h2m2 0h2m2 0h27m54 0h30m-5 0q-5 0-5-5v-20q0-5 5-5h34m24 0h35q5 0 5 5v20q0 5-5 5m-5 0h40m-222 0q5 0 5 5v8q0 5 5 5h197q5 0 5-5v-8q0-5 5-5m5 0h7m2 0h2m2 0h2m-257 50h2m2 0h2m2 0h27m65 0h10m137 0h20m-247 0q5 0 5 5v8q0 5 5 5h222q5 0 5-5v-8q0-5 5-5m5 0h7m2 0h2m2 0h2m-282 80h2m2 0h2m2 0h27m62 0h10m35 0h30m-5 0q-5 0-5-5v-20q0-5 5-5h57m24 0h58q5 0 5 5v20q0 5-5 5m-5 0h40m-321 0q5 0 5 5v8q0 5 5 5h296q5 0 5-5v-8q0-5 5-5m5 0h7m2 0h2m2 0h2m-356 50h2m2 0h2m2 0h27m68 0h10m137 0h20m-250 0q5 0 5 5v8q0 5 5 5h225q5 0 5-5v-8q0-5 5-5m5 0h7m2 0h2m2 0h2m-285 80h2m2 0h2m2 0h27m76 0h30m-5 0q-5 0-5-5v-20q0-5 5-5h112m24 0h112q5 0 5 5v20q0 5-5 5m-189 0h10m36 0h10m128 0h40m-399 0q5 0 5 5v8q0 5 5 5h374q5 0 5-5v-8q0-5 5-5m5 0h7m2 0h2m2 0h2m-434 50h2m2 0h2m2 0h47m61 0h47m-118 25q0 5 5 5h5m88 0h5q5 0 5-5m-113-25q5 0 5 5v50q0 5 5 5h5m66 0h27q5 0 5-5v-50q0-5 5-5m5 0h30m42 0h56m-108 25q0 5 5 5h5m78 0h5q5 0 5-5m-103-25q5 0 5 5v33q0 5 5 5h88q5 0 5-5v-33q0-5 5-5m5 0h10m54 0h20m-355 0q5 0 5 5v68q0 5 5 5h330q5 0 5-5v-68q0-5 5-5m5 0h7m2 0h2m2 0h2m-390 140h2m2 0h2m2 0h27m62 0h10m35 0h30m-5 0q-5 0-5-5v-20q0-5 5-5h35m24 0h36q5 0 5 5v20q0 5-5 5m-5 0h40m-277 0q5 0 5 5v8q0 5 5 5h252q5 0 5-5v-8q0-5 5-5m5 0h7m2 0h2m2 0h2m-312 50h2m2 0h2m2 0h27m54 0h30m62 0h20m-97 0q5 0 5 5v20q0 5 5 5h5m42 0h25q5 0 5-5v-20q0-5 5-5m5 0h20m-201 0q5 0 5 5v38q0 5 5 5h176q5 0 5-5v-38q0-5 5-5m5 0h7m2 0h2m2 0h2m-236 80h2m2 0h2m2 0h27m66 0h10m62 0h30m49 0h28m-87 25q0 5 5 5h5m57 0h5q5 0 5-5m-82-25q5 0 5 5v33q0 5 5 5h67q5 0 5-5v-33q0-5 5-5m5 0h20m-280 0q5 0 5 5v43q0 5 5 5h255q5 0 5-5v-43q0-5 5-5m5 0h7m2 0h2m2 0h2m-315 85h2m2 0h2m2 0h27m59 0h30m55 0h20m-90 0q5 0 5 5v20q0 5 5 5h5m52 0h8q5 0 5-5v-20q0-5 5-5m5 0h10m62 0h30m49 0h28m-92 0q5 0 5 5v20q0 5 5 5h5m57 0h5q5 0 5-5v-20q0-5 5-5m5 0h10m52 0h20m-440 0q5 0 5 5v38q0 5 5 5h415q5 0 5-5v-38q0-5 5-5m5 0h7m2 0h2m2 0h2m-475 125h2m2 0h2m2 0h47m-5 0q-5 0-5-5v-47q0-5 5-5h599q5 0 5 5v47q0 5-5 5m-550 0h30m68 0h69m-147 25q0 5 5 5h5m117 0h5q5 0 5-5m-137 30q0 5 5 5h5m61 0h61q5 0 5-5m-142-55q5 0 5 5v80q0 5 5 5h5m88 0h34q5 0 5-5v-80q0-5 5-5m5 0h30m36 0h30m-5 0q-5 0-5-5v-20q0-5 5-5h38m24 0h39q5 0 5 5v20q0 5-5 5m-5 0h40m-212 0q5 0 5 5v8q0 5 5 5h187q5 0 5-5v-8q0-5 5-5m5 0h30m70 0h51m-131 25q0 5 5 5h5m101 0h5q5 0 5-5m-126-25q5 0 5 5v33q0 5 5 5h111q5 0 5-5v-33q0-5 5-5m5 0h40m-664 0q5 0 5 5v98q0 5 5 5h639q5 0 5-5v-98q0-5 5-5m5 0h15"/><polygon points="0,59 5,52 0,45" style="fill:black;stroke-width:0"/><rect class="literal" x="35" y="35" width="53" height="25" rx="7"/><text class="text" x="45" y="52">WITH</text><rect class="literal" x="118" y="35" width="90" height="25" rx="7"/><text class="text" x="128" y="52">RECURSIVE</text><rect class="literal" x="336" y="5" width="24" height="25" rx="7"/><text class="text" x="346" y="22">,</text><a xlink:href="#common-table-expression"><rect class="rule" x="258" y="35" width="180" height="25"/><text class="text" x="268" y="52">commontableexpression</text></a><rect class="literal" x="15" y="100" width="66" height="25" rx="7"/><text class="text" x="25" y="117">SELECT</text><rect class="literal" x="111" y="100" width="42" height="25" rx="7"/><text class="text" x="121" y="117">ALL</text><rect class="literal" x="111" y="160" width="78" height="25" rx="7"/><text class="text" x="121" y="177">DISTINCT</text><rect class="literal" x="219" y="160" width="38" height="25" rx="7"/><text class="text" x="229" y="177">ON</text><rect class="literal" x="267" y="160" width="25" height="25" rx="7"/><text class="text" x="277" y="177">(</text><rect class="literal" x="351" y="130" width="24" height="25" rx="7"/><text class="text" x="361" y="147">,</text><a xlink:href="../../../syntaxresources/grammardiagrams#expression"><rect class="rule" x="322" y="160" width="83" height="25"/><text class="text" x="332" y="177">expression</text></a><rect class="literal" x="435" y="160" width="25" height="25" rx="7"/><text class="text" x="445" y="177">)</text><rect class="literal" x="530" y="100" width="28" height="25" rx="7"/><text class="text" x="540" y="117">*</text><rect class="literal" x="780" y="130" width="24" height="25" rx="7"/><text class="text" x="790" y="147">,</text><a xlink:href="../../../syntaxresources/grammardiagrams#expression"><rect class="rule" x="570" y="160" width="83" height="25"/><text class="text" x="580" y="177">expression</text></a><a xlink:href="#fn-over-window"><rect class="rule" x="570" y="190" width="119" height="25"/><text class="text" x="580" y="207">fnoverwindow</text></a><a xlink:href="#ordinary-aggregate-fn-invocation"><rect class="rule" x="570" y="220" width="225" height="25"/><text class="text" x="580" y="237">ordinaryaggregatefninvocation</text></a><a xlink:href="#within-group-aggregate-fn-invocation"><rect class="rule" x="570" y="250" width="255" height="25"/><text class="text" x="580" y="267">withingroupaggregatefninvocation</text></a><rect class="literal" x="895" y="160" width="36" height="25" rx="7"/><text class="text" x="905" y="177">AS</text><a xlink:href="../../../syntaxresources/grammardiagrams#name"><rect class="rule" x="961" y="160" width="54" height="25"/><text class="text" x="971" y="177">name</text></a><rect class="literal" x="35" y="320" width="54" height="25" rx="7"/><text class="text" x="45" y="337">FROM</text><rect class="literal" x="148" y="290" width="24" height="25" rx="7"/><text class="text" x="158" y="307">,</text><a xlink:href="../../../syntaxresources/grammardiagrams#from-item"><rect class="rule" x="119" y="320" width="83" height="25"/><text class="text" x="129" y="337">fromitem</text></a><rect class="literal" x="35" y="370" width="65" height="25" rx="7"/><text class="text" x="45" y="387">WHERE</text><a xlink:href="../../../syntaxresources/grammardiagrams#boolean-expression"><rect class="rule" x="110" y="370" width="137" height="25"/><text class="text" x="120" y="387">booleanexpression</text></a><rect class="literal" x="35" y="450" width="62" height="25" rx="7"/><text class="text" x="45" y="467">GROUP</text><rect class="literal" x="107" y="450" width="35" height="25" rx="7"/><text class="text" x="117" y="467">BY</text><rect class="literal" x="224" y="420" width="24" height="25" rx="7"/><text class="text" x="234" y="437">,</text><a xlink:href="#grouping-element"><rect class="rule" x="172" y="450" width="129" height="25"/><text class="text" x="182" y="467">groupingelement</text></a><rect class="literal" x="35" y="500" width="68" height="25" rx="7"/><text class="text" x="45" y="517">HAVING</text><a xlink:href="../../../syntaxresources/grammardiagrams#boolean-expression"><rect class="rule" x="113" y="500" width="137" height="25"/><text class="text" x="123" y="517">booleanexpression</text></a><rect class="literal" x="35" y="580" width="76" height="25" rx="7"/><text class="text" x="45" y="597">WINDOW</text><rect class="literal" x="248" y="550" width="24" height="25" rx="7"/><text class="text" x="258" y="567">,</text><a xlink:href="../../../syntaxresources/grammardiagrams#name"><rect class="rule" x="141" y="580" width="54" height="25"/><text class="text" x="151" y="597">name</text></a><rect class="literal" x="205" y="580" width="36" height="25" rx="7"/><text class="text" x="215" y="597">AS</text><a xlink:href="../../../syntaxresources/grammardiagrams#window-definition"><rect class="rule" x="251" y="580" width="128" height="25"/><text class="text" x="261" y="597">windowdefinition</text></a><rect class="literal" x="55" y="630" width="61" height="25" rx="7"/><text class="text" x="65" y="647">UNION</text><rect class="literal" x="55" y="660" width="88" height="25" rx="7"/><text class="text" x="65" y="677">INTERSECT</text><rect class="literal" x="55" y="690" width="66" height="25" rx="7"/><text class="text" x="65" y="707">EXCEPT</text><rect class="literal" x="193" y="630" width="42" height="25" rx="7"/><text class="text" x="203" y="647">ALL</text><rect class="literal" x="193" y="660" width="78" height="25" rx="7"/><text class="text" x="203" y="677">DISTINCT</text><a xlink:href="#select"><rect class="rule" x="301" y="630" width="54" height="25"/><text class="text" x="311" y="647">select</text></a><rect class="literal" x="35" y="770" width="62" height="25" rx="7"/><text class="text" x="45" y="787">ORDER</text><rect class="literal" x="107" y="770" width="35" height="25" rx="7"/><text class="text" x="117" y="787">BY</text><rect class="literal" x="202" y="740" width="24" height="25" rx="7"/><text class="text" x="212" y="757">,</text><a xlink:href="#order-expr"><rect class="rule" x="172" y="770" width="85" height="25"/><text class="text" x="182" y="787">orderexpr</text></a><rect class="literal" x="35" y="820" width="54" height="25" rx="7"/><text class="text" x="45" y="837">LIMIT</text><a xlink:href="../../../syntaxresources/grammardiagrams#integer"><rect class="rule" x="119" y="820" width="62" height="25"/><text class="text" x="129" y="837">integer</text></a><rect class="literal" x="119" y="850" width="42" height="25" rx="7"/><text class="text" x="129" y="867">ALL</text><rect class="literal" x="35" y="900" width="66" height="25" rx="7"/><text class="text" x="45"

xlink:href="../../../syntaxresources/grammardiagrams#integer"><rect class="rule" x="111" y="900" width="62" height="25"/><text class="text" x="121" y="917">integer</text></a><rect class="literal" x="203" y="900" width="49" height="25" rx="7"/><text class="text" x="213" y="917">ROW</text><rect class="literal" x="203" y="930" width="57" height="25" rx="7"/><text class="text" x="213" y="947">ROWS</text><rect class="literal" x="35" y="985" width="59" height="25" rx="7"/><text class="text" x="45" y="1002">FETCH</text><a xlink:href="../../../syntaxresources/grammardiagrams#FIRST"><rect class="rule" x="124" y="985" width="55" height="25"/><text class="text" x="134" y="1002">FIRST</text></a><a xlink:href="../../../syntaxresources/grammardiagrams#NEXT"><rect class="rule" x="124" y="1015" width="52" height="25"/><text class="text" x="134" y="1032">NEXT</text></a><a xlink:href="../../../syntaxresources/grammardiagrams#integer"><rect class="rule" x="209" y="985" width="62" height="25"/><text class="text" x="219" y="1002">integer</text></a><a xlink:href="../../../syntaxresources/grammardiagrams#ROW"><rect class="rule" x="301" y="985" width="49" height="25"/><text class="text" x="311" y="1002">ROW</text></a><a xlink:href="../../../syntaxresources/grammardiagrams#ROWS"><rect class="rule" x="301" y="1015" width="57" height="25"/><text class="text" x="311" y="1032">ROWS</text></a><a xlink:href="../../../syntaxresources/grammardiagrams#ONLY"><rect class="rule" x="388" y="985" width="52" height="25"/><text class="text" x="398" y="1002">ONLY</text></a><rect class="literal" x="55" y="1110" width="44" height="25" rx="7"/><text class="text" x="65" y="1127">FOR</text><rect class="literal" x="129" y="1110" width="68" height="25" rx="7"/><text class="text" x="139" y="1127">UPDATE</text><rect class="literal" x="129" y="1140" width="117" height="25" rx="7"/><text class="text" x="139" y="1157">NO KEY UPDATE</text><rect class="literal" x="129" y="1170" width="61" height="25" rx="7"/><text class="text" x="139" y="1187">SHARE</text><rect class="literal" x="129" y="1200" width="88" height="25" rx="7"/><text class="text" x="139" y="1217">KEY SHARE</text><rect class="literal" x="296" y="1110" width="36" height="25" rx="7"/><text class="text" x="306" y="1127">OF</text><rect class="literal" x="395" y="1080" width="24" height="25" rx="7"/><text class="text" x="405" y="1097">,</text><a xlink:href="../../../syntaxresources/grammardiagrams#table-name"><rect class="rule" x="362" y="1110" width="91" height="25"/><text class="text" x="372" y="1127">tablename</text></a><rect class="literal" x="523" y="1110" width="70" height="25" rx="7"/><text class="text" x="533" y="1127">NOWAIT</text><rect class="literal" x="523" y="1140" width="101" height="25" rx="7"/><text class="text" x="533" y="1157">SKIP LOCKED</text><polygon points="695,1134 699,1134 699,1120 695,1120" style="fill:black;stroke-width:0"/></svg> <svg class="rrdiagram" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" width="525" height="185" viewbox="0 0 525 185"><path class="connector" d="M0 52h15m54 0h30m25 0h30m-5 0q-5 0-5-5v-20q0-5 5-5h20m24 0h20q5 0 5 5v20q0 5-5 5m-5 0h30m25 0h20m-199 0q5 0 5 5v8q0 5 5 5h174q5 0 5-5v-8q0-5 5-5m5 0h10m36 0h10m25 0h30m54 0h27m-91 25q0 5 5 5h5m58 0h8q5 0 5-5m-81 30q0 5 5 5h5m54 0h12q5 0 5-5m-81 30q0 5 5 5h5m61 0h5q5 0 5-5m-86-85q5 0 5 5v110q0 5 5 5h5m56 0h10q5 0 5-5v-110q0-5 5-5m5 0h10m25 0h15"/><polygon points="0,59 5,52 0,45" style="fill:black;stroke-width:0"/><a xlink:href="../../../syntaxresources/grammardiagrams#name"><rect class="rule" x="15" y="35" width="54" height="25"/><text class="text" x="25" y="52">name</text></a><rect class="literal" x="99" y="35" width="25" height="25" rx="7"/><text class="text" x="109" y="52">(</text><rect class="literal" x="169" y="5" width="24" height="25" rx="7"/><text class="text" x="179" y="22">,</text><a xlink:href="../../../syntaxresources/grammardiagrams#name"><rect class="rule" x="154" y="35" width="54" height="25"/><text class="text" x="164" y="52">name</text></a><rect class="literal" x="238" y="35" width="25" height="25" rx="7"/><text class="text" x="248" y="52">)</text><rect class="literal" x="293" y="35" width="36" height="25" rx="7"/><text class="text" x="303" y="52">AS</text><rect class="literal" x="339" y="35" width="25" height="25" rx="7"/><text class="text" x="349" y="52">(</text><a xlink:href="#select"><rect class="rule" x="394" y="35" width="54" height="25"/><text class="text" x="404" y="52">select</text></a><a xlink:href="../../../syntaxresources/grammardiagrams#values"><rect class="rule" x="394" y="65" width="58" height="25"/><text class="text" x="404" y="82">values</text></a><a xlink:href="../../../syntaxresources/grammardiagrams#insert"><rect class="rule" x="394" y="95" width="54" height="25"/><text class="text" x="404" y="112">insert</text></a><a xlink:href="../../../syntaxresources/grammardiagrams#update"><rect class="rule" x="394" y="125" width="61" height="25"/><text class="text" x="404" y="142">update</text></a><a xlink:href="../../../syntaxresources/grammardiagrams#delete"><rect class="rule" x="394" y="155" width="56" height="25"/><text class="text" x="404" y="172">delete</text></a><rect class="literal" x="485" y="35" width="25" height="25" rx="7"/><text class="text" x="495" y="52">)</text><polygon points="521,59 525,59 525,45 521,45" style="fill:black;stroke-width:0"/></svg> <svg class="rrdiagram" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" width="665" height="200" viewbox="0 0 665 200"><path class="connector" d="M0 22h15m54 0h7m2 0h2m2 0h2m-84 65h2m2 0h2m2 0h7m25 0h50m-5 0q-5 0-5-5v-20q0-5 5-5h34m24 0h35q5 0 5 5v20q0 5-5 5m-5 0h40m-153 25q0 5 5 5h5m28 0h100q5 0 5-5m-148-25q5 0 5 5v33q0 5 5 5h133q5 0 5-5v-33q0-5 5-5m5 0h7m2 0h2m2 0h2m-228 70h2m2 0h2m2 0h27m62 0h10m25 0h10m65 0h10m137 0h10m25 0h20m-389 0q5 0 5 5v8q0 5 5 5h364q5 0 5-5v-8q0-5 5-5m5 0h10m53 0h30m128 0h20m-163 0q5 0 5 5v20q0 5 5 5h5m54 0h79q5 0 5-5v-20q0-5 5-5m5 0h15"/><polygon points="0,29 5,22 0,15" style="fill:black;stroke-width:0"/><a xlink:href="../../../syntaxresources/grammardiagrams#name"><rect class="rule" x="15" y="5" width="54" height="25"/><text class="text" x="25" y="22">name</text></a><rect class="literal" x="15" y="70" width="25" height="25" rx="7"/><text class="text" x="25" y="87">(</text><rect class="literal" x="119" y="40" width="24" height="25" rx="7"/><text class="text" x="129"

xlink:href="../../../syntaxresources/grammardiagrams#expression"><rect class="rule" x="90" y="70" width="83" height="25"/><text class="text" x="100" y="87">expression</text></a><rect class="literal" x="70" y="100" width="28" height="25" rx="7"/><text class="text" x="80" y="117">*</text><rect class="literal" x="35" y="140" width="62" height="25" rx="7"/><text class="text" x="45" y="157">FILTER</text><rect class="literal" x="107" y="140" width="25" height="25" rx="7"/><text class="text" x="117" y="157">(</text><rect class="literal" x="142" y="140" width="65" height="25" rx="7"/><text class="text" x="152" y="157">WHERE</text><a xlink:href="../../../syntaxresources/grammardiagrams#boolean-expression"><rect class="rule" x="217" y="140" width="137" height="25"/><text class="text" x="227" y="157">booleanexpression</text></a><rect class="literal" x="364" y="140" width="25" height="25" rx="7"/><text class="text" x="374" y="157">)</text><rect class="literal" x="419" y="140" width="53" height="25" rx="7"/><text class="text" x="429" y="157">OVER</text><a xlink:href="../../../syntaxresources/grammardiagrams#window-definition"><rect class="rule" x="502" y="140" width="128" height="25"/><text class="text" x="512" y="157">windowdefinition</text></a><a xlink:href="../../../syntaxresources/grammardiagrams#name"><rect class="rule" x="502" y="170" width="54" height="25"/><text class="text" x="512" y="187">name</text></a><polygon points="661,164 665,164 665,150 661,150" style="fill:black;stroke-width:0"/></svg> <svg class="rrdiagram" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" width="683" height="215" viewbox="0 0 683 215"><path class="connector" d="M0 22h15m54 0h7m2 0h2m2 0h2m-84 65h2m2 0h2m2 0h7m25 0h50m42 0h56m-108 25q0 5 5 5h5m78 0h5q5 0 5-5m-103-25q5 0 5 5v33q0 5 5 5h88q5 0 5-5v-33q0-5 5-5m5 0h30m-5 0q-5 0-5-5v-20q0-5 5-5h34m24 0h35q5 0 5 5v20q0 5-5 5m-5 0h40m-286 0q5 0 5 5v55q0 5 5 5h5m28 0h228q5 0 5-5v-55q0-5 5-5m5 0h30m62 0h10m35 0h30m-5 0q-5 0-5-5v-20q0-5 5-5h35m24 0h36q5 0 5 5v20q0 5-5 5m-5 0h40m-277 0q5 0 5 5v8q0 5 5 5h252q5 0 5-5v-8q0-5 5-5m5 0h10m25 0h7m2 0h2m2 0h2m-683 100h2m2 0h2m2 0h27m62 0h10m25 0h10m65 0h10m137 0h10m25 0h20m-389 0q5 0 5 5v8q0 5 5 5h364q5 0 5-5v-8q0-5 5-5m5 0h15"/><polygon points="0,29 5,22 0,15" style="fill:black;stroke-width:0"/><a xlink:href="../../../syntaxresources/grammardiagrams#name"><rect class="rule" x="15" y="5" width="54" height="25"/><text class="text" x="25" y="22">name</text></a><rect class="literal" x="15" y="70" width="25" height="25" rx="7"/><text class="text" x="25" y="87">(</text><rect class="literal" x="90" y="70" width="42" height="25" rx="7"/><text class="text" x="100" y="87">ALL</text><rect class="literal" x="90" y="100" width="78" height="25" rx="7"/><text class="text" x="100" y="117">DISTINCT</text><rect class="literal" x="247" y="40" width="24" height="25" rx="7"/><text class="text" x="257" y="57">,</text><a xlink:href="../../../syntaxresources/grammardiagrams#expression"><rect class="rule" x="218" y="70" width="83" height="25"/><text class="text" x="228" y="87">expression</text></a><rect class="literal" x="70" y="135" width="28" height="25" rx="7"/><text class="text" x="80" y="152">*</text><rect class="literal" x="371" y="70" width="62" height="25" rx="7"/><text class="text" x="381" y="87">ORDER</text><rect class="literal" x="443" y="70" width="35" height="25" rx="7"/><text class="text" x="453" y="87">BY</text><rect class="literal" x="538" y="40" width="24" height="25" rx="7"/><text class="text" x="548" y="57">,</text><a xlink:href="#order-expr"><rect class="rule" x="508" y="70" width="85" height="25"/><text class="text" x="518" y="87">orderexpr</text></a><rect class="literal" x="643" y="70" width="25" height="25" rx="7"/><text class="text" x="653" y="87">)</text><rect class="literal" x="35" y="170" width="62" height="25" rx="7"/><text class="text" x="45" y="187">FILTER</text><rect class="literal" x="107" y="170" width="25" height="25" rx="7"/><text class="text" x="117" y="187">(</text><rect class="literal" x="142" y="170" width="65" height="25" rx="7"/><text class="text" x="152" y="187">WHERE</text><a xlink:href="../../../syntaxresources/grammardiagrams#boolean-expression"><rect class="rule" x="217" y="170" width="137" height="25"/><text class="text" x="227" y="187">booleanexpression</text></a><rect class="literal" x="364" y="170" width="25" height="25" rx="7"/><text class="text" x="374" y="187">)</text><polygon points="420,194 424,194 424,180 420,180" style="fill:black;stroke-width:0"/></svg> <svg class="rrdiagram" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" width="491" height="215" viewbox="0 0 491 215"><path class="connector" d="M0 22h15m54 0h7m2 0h2m2 0h2m-84 65h2m2 0h2m2 0h7m25 0h30m-5 0q-5 0-5-5v-20q0-5 5-5h34m24 0h35q5 0 5 5v20q0 5-5 5m-5 0h30m25 0h7m2 0h2m2 0h2m-223 65h2m2 0h2m2 0h7m67 0h10m62 0h10m25 0h10m62 0h10m35 0h30m-5 0q-5 0-5-5v-20q0-5 5-5h35m24 0h36q5 0 5 5v20q0 5-5 5m-5 0h30m25 0h7m2 0h2m2 0h2m-491 35h2m2 0h2m2 0h27m62 0h10m25 0h10m65 0h10m137 0h10m25 0h20m-389 0q5 0 5 5v8q0 5 5 5h364q5 0 5-5v-8q0-5 5-5m5 0h15"/><polygon points="0,29 5,22 0,15" style="fill:black;stroke-width:0"/><a xlink:href="../../../syntaxresources/grammardiagrams#name"><rect class="rule" x="15" y="5" width="54" height="25"/><text class="text" x="25" y="22">name</text></a><rect class="literal" x="15" y="70" width="25" height="25" rx="7"/><text class="text" x="25" y="87">(</text><rect class="literal" x="99" y="40" width="24" height="25" rx="7"/><text class="text" x="109"

xlink:href="../../../syntaxresources/grammardiagrams#expression"><rect class="rule" x="70" y="70" width="83" height="25"/><text class="text" x="80" y="87">expression</text></a><rect class="literal" x="183" y="70" width="25" height="25" rx="7"/><text class="text" x="193" y="87">)</text><rect class="literal" x="15" y="135" width="67" height="25" rx="7"/><text class="text" x="25" y="152">WITHIN</text><rect class="literal" x="92" y="135" width="62" height="25" rx="7"/><text class="text" x="102" y="152">GROUP</text><rect class="literal" x="164" y="135" width="25" height="25" rx="7"/><text class="text" x="174" y="152">(</text><rect class="literal" x="199" y="135" width="62" height="25" rx="7"/><text class="text" x="209" y="152">ORDER</text><rect class="literal" x="271" y="135" width="35" height="25" rx="7"/><text class="text" x="281" y="152">BY</text><rect class="literal" x="366" y="105" width="24" height="25" rx="7"/><text class="text" x="376" y="122">,</text><a xlink:href="#order-expr"><rect class="rule" x="336" y="135" width="85" height="25"/><text class="text" x="346" y="152">orderexpr</text></a><rect class="literal" x="451" y="135" width="25" height="25" rx="7"/><text class="text" x="461" y="152">)</text><rect class="literal" x="35" y="170" width="62" height="25" rx="7"/><text class="text" x="45" y="187">FILTER</text><rect class="literal" x="107" y="170" width="25" height="25" rx="7"/><text class="text" x="117" y="187">(</text><rect class="literal" x="142" y="170" width="65" height="25" rx="7"/><text class="text" x="152" y="187">WHERE</text><a xlink:href="../../../syntaxresources/grammardiagrams#boolean-expression"><rect class="rule" x="217" y="170" width="137" height="25"/><text class="text" x="227" y="187">booleanexpression</text></a><rect class="literal" x="364" y="170" width="25" height="25" rx="7"/><text class="text" x="374" y="187">)</text><polygon points="420,194 424,194 424,180 420,180" style="fill:black;stroke-width:0"/></svg> <svg class="rrdiagram" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" width="465" height="275" viewbox="0 0 465 275"><path class="connector" d="M0 22h35m25 0h10m25 0h355m-425 55q0 5 5 5h5m25 0h30m-5 0q-5 0-5-5v-20q0-5 5-5h34m24 0h35q5 0 5 5v20q0 5-5 5m-5 0h30m25 0h207q5 0 5-5m-415 60q0 5 5 5h5m67 0h10m25 0h30m-5 0q-5 0-5-5v-20q0-5 5-5h34m24 0h35q5 0 5 5v20q0 5-5 5m-5 0h30m25 0h130q5 0 5-5m-415 60q0 5 5 5h5m53 0h10m25 0h30m-5 0q-5 0-5-5v-20q0-5 5-5h34m24 0h35q5 0 5 5v20q0 5-5 5m-5 0h30m25 0h144q5 0 5-5m-420-175q5 0 5 5v230q0 5 5 5h5m85 0h10m51 0h10m25 0h30m-5 0q-5 0-5-5v-20q0-5 5-5h57m24 0h58q5 0 5 5v20q0 5-5 5m-5 0h30m25 0h5q5 0 5-5v-230q0-5 5-5m5 0h15"/><polygon points="0,29 5,22 0,15" style="fill:black;stroke-width:0"/><rect class="literal" x="35" y="5" width="25" height="25" rx="7"/><text class="text" x="45" y="22">(</text><rect class="literal" x="70" y="5" width="25" height="25" rx="7"/><text class="text" x="80" y="22">)</text><rect class="literal" x="35" y="65" width="25" height="25" rx="7"/><text class="text" x="45" y="82">(</text><rect class="literal" x="119" y="35" width="24" height="25" rx="7"/><text class="text" x="129" y="52">,</text><a xlink:href="../../../syntaxresources/grammardiagrams#expression"><rect class="rule" x="90" y="65" width="83" height="25"/><text class="text" x="100" y="82">expression</text></a><rect class="literal" x="203" y="65" width="25" height="25" rx="7"/><text class="text" x="213" y="82">)</text><rect class="literal" x="35" y="125" width="67" height="25" rx="7"/><text class="text" x="45" y="142">ROLLUP</text><rect class="literal" x="112" y="125" width="25" height="25" rx="7"/><text class="text" x="122" y="142">(</text><rect class="literal" x="196" y="95" width="24" height="25" rx="7"/><text class="text" x="206" y="112">,</text><a xlink:href="../../../syntaxresources/grammardiagrams#expression"><rect class="rule" x="167" y="125" width="83" height="25"/><text class="text" x="177" y="142">expression</text></a><rect class="literal" x="280" y="125" width="25" height="25" rx="7"/><text class="text" x="290" y="142">)</text><rect class="literal" x="35" y="185" width="53" height="25" rx="7"/><text class="text" x="45" y="202">CUBE</text><rect class="literal" x="98" y="185" width="25" height="25" rx="7"/><text class="text" x="108" y="202">(</text><rect class="literal" x="182" y="155" width="24" height="25" rx="7"/><text class="text" x="192" y="172">,</text><a xlink:href="../../../syntaxresources/grammardiagrams#expression"><rect class="rule" x="153" y="185" width="83" height="25"/><text class="text" x="163" y="202">expression</text></a><rect class="literal" x="266" y="185" width="25" height="25" rx="7"/><text class="text" x="276" y="202">)</text><rect class="literal" x="35" y="245" width="85" height="25" rx="7"/><text class="text" x="45" y="262">GROUPING</text><rect class="literal" x="130" y="245" width="51" height="25" rx="7"/><text class="text" x="140" y="262">SETS</text><rect class="literal" x="191" y="245" width="25" height="25" rx="7"/><text class="text" x="201" y="262">(</text><rect class="literal" x="298" y="215" width="24" height="25" rx="7"/><text class="text" x="308" y="232">,</text><a xlink:href="#grouping-element"><rect class="rule" x="246" y="245" width="129" height="25"/><text class="text" x="256" y="262">grouping_element</text></a><rect class="literal" x="405" y="245" width="25" height="25" rx="7"/><text class="text" x="415" y="262">)</text><polygon points="461,29 465,29 465,15 461,15" style="fill:black;stroke-width:0"/></svg> <svg class="rrdiagram" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" width="560" height="100" viewbox="0 0 560 100"><path class="connector" d="M0 22h15m83 0h30m44 0h158m-212 25q0 5 5 5h5m53 0h134q5 0 5-5m-202 30q0 5 5 5h5m60 0h10m112 0h5q5 0 5-5m-207-55q5 0 5 5v63q0 5 5 5h192q5 0 5-5v-63q0-5 5-5m5 0h30m60 0h30m55 0h20m-90 0q5 0 5 5v20q0 5 5 5h5m50 0h10q5 0 5-5v-20q0-5 5-5m5 0h20m-200 0q5 0 5 5v38q0 5 5 5h175q5 0 5-5v-38q0-5 5-5m5 0h15"/><polygon points="0,29 5,22 0,15" style="fill:black;stroke-width:0"/><a xlink:href="../../../syntaxresources/grammardiagrams#expression"><rect class="rule" x="15" y="5" width="83" height="25"/><text class="text" x="25" y="22">expression</text></a><rect class="literal" x="128" y="5" width="44" height="25" rx="7"/><text class="text" x="138" y="22">ASC</text><rect class="literal" x="128" y="35" width="53" height="25" rx="7"/><text class="text" x="138" y="52">DESC</text><rect class="literal" x="128" y="65" width="60" height="25" rx="7"/><text class="text" x="138" y="82">USING</text><a xlink:href="../../../syntaxresources/grammardiagrams#operator-name"><rect class="rule" x="198" y="65" width="112" height="25"/><text class="text" x="208" y="82">operator_name</text></a><rect class="literal" x="360" y="5" width="60" height="25" rx="7"/><text class="text" x="370" y="22">NULLS</text><rect class="literal" x="450" y="5" width="55" height="25" rx="7"/><text class="text" x="460" y="22">FIRST</text><rect class="literal" x="450" y="35" width="50" height="25" rx="7"/><text class="text" x="460" y="52">LAST</text><polygon points="556,29 560,29 560,15 556,15" style="fill:black;stroke-width:0"/></svg>