simple-select-stmt.svg 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  1. <svg xmlns="http://www.w3.org/2000/svg" width="627" height="1123">
  2. <polygon points="9 17 1 13 1 21"/>
  3. <polygon points="17 17 9 13 9 21"/>
  4. <rect x="31" y="3" width="74" height="32" rx="10"/>
  5. <rect x="29"
  6. y="1"
  7. width="74"
  8. height="32"
  9. class="terminal"
  10. rx="10"/>
  11. <text class="terminal" x="39" y="21">SELECT</text>
  12. <rect x="145" y="35" width="46" height="32" rx="10"/>
  13. <rect x="143"
  14. y="33"
  15. width="46"
  16. height="32"
  17. class="terminal"
  18. rx="10"/>
  19. <text class="terminal" x="153" y="53">ALL</text>
  20. <rect x="145" y="123" width="86" height="32" rx="10"/>
  21. <rect x="143"
  22. y="121"
  23. width="86"
  24. height="32"
  25. class="terminal"
  26. rx="10"/>
  27. <text class="terminal" x="153" y="141">DISTINCT</text>
  28. <rect x="271" y="123" width="40" height="32" rx="10"/>
  29. <rect x="269"
  30. y="121"
  31. width="40"
  32. height="32"
  33. class="terminal"
  34. rx="10"/>
  35. <text class="terminal" x="279" y="141">ON</text>
  36. <rect x="331" y="123" width="26" height="32" rx="10"/>
  37. <rect x="329"
  38. y="121"
  39. width="26"
  40. height="32"
  41. class="terminal"
  42. rx="10"/>
  43. <text class="terminal" x="339" y="141">(</text>
  44. <rect x="397" y="123" width="64" height="32"/>
  45. <rect x="395" y="121" width="64" height="32" class="nonterminal"/>
  46. <text class="nonterminal" x="405" y="141">col_ref</text>
  47. <rect x="397" y="79" width="24" height="32" rx="10"/>
  48. <rect x="395"
  49. y="77"
  50. width="24"
  51. height="32"
  52. class="terminal"
  53. rx="10"/>
  54. <text class="terminal" x="405" y="97">,</text>
  55. <rect x="501" y="123" width="26" height="32" rx="10"/>
  56. <rect x="499"
  57. y="121"
  58. width="26"
  59. height="32"
  60. class="terminal"
  61. rx="10"/>
  62. <text class="terminal" x="509" y="141">)</text>
  63. <rect x="83" y="249" width="98" height="32"/>
  64. <rect x="81" y="247" width="98" height="32" class="nonterminal"/>
  65. <text class="nonterminal" x="91" y="267">target_elem</text>
  66. <rect x="83" y="205" width="24" height="32" rx="10"/>
  67. <rect x="81"
  68. y="203"
  69. width="24"
  70. height="32"
  71. class="terminal"
  72. rx="10"/>
  73. <text class="terminal" x="91" y="223">,</text>
  74. <rect x="221" y="249" width="60" height="32" rx="10"/>
  75. <rect x="219"
  76. y="247"
  77. width="60"
  78. height="32"
  79. class="terminal"
  80. rx="10"/>
  81. <text class="terminal" x="229" y="267">FROM</text>
  82. <rect x="321" y="249" width="88" height="32"/>
  83. <rect x="319" y="247" width="88" height="32" class="nonterminal"/>
  84. <text class="nonterminal" x="329" y="267">table_expr</text>
  85. <rect x="321" y="205" width="24" height="32" rx="10"/>
  86. <rect x="319"
  87. y="203"
  88. width="24"
  89. height="32"
  90. class="terminal"
  91. rx="10"/>
  92. <text class="terminal" x="329" y="223">,</text>
  93. <rect x="469" y="281" width="78" height="32"/>
  94. <rect x="467" y="279" width="78" height="32" class="nonterminal"/>
  95. <text class="nonterminal" x="477" y="299">join_expr</text>
  96. <rect x="89" y="423" width="70" height="32" rx="10"/>
  97. <rect x="87"
  98. y="421"
  99. width="70"
  100. height="32"
  101. class="terminal"
  102. rx="10"/>
  103. <text class="terminal" x="97" y="441">WHERE</text>
  104. <rect x="179" y="423" width="48" height="32"/>
  105. <rect x="177" y="421" width="48" height="32" class="nonterminal"/>
  106. <text class="nonterminal" x="187" y="441">expr</text>
  107. <rect x="287" y="391" width="70" height="32" rx="10"/>
  108. <rect x="285"
  109. y="389"
  110. width="70"
  111. height="32"
  112. class="terminal"
  113. rx="10"/>
  114. <text class="terminal" x="295" y="409">GROUP</text>
  115. <rect x="377" y="391" width="40" height="32" rx="10"/>
  116. <rect x="375"
  117. y="389"
  118. width="40"
  119. height="32"
  120. class="terminal"
  121. rx="10"/>
  122. <text class="terminal" x="385" y="409">BY</text>
  123. <rect x="457" y="391" width="64" height="32"/>
  124. <rect x="455" y="389" width="64" height="32" class="nonterminal"/>
  125. <text class="nonterminal" x="465" y="409">col_ref</text>
  126. <rect x="457" y="347" width="24" height="32" rx="10"/>
  127. <rect x="455"
  128. y="345"
  129. width="24"
  130. height="32"
  131. class="terminal"
  132. rx="10"/>
  133. <text class="terminal" x="465" y="365">,</text>
  134. <rect x="113" y="533" width="84" height="32" rx="10"/>
  135. <rect x="111"
  136. y="531"
  137. width="84"
  138. height="32"
  139. class="terminal"
  140. rx="10"/>
  141. <text class="terminal" x="121" y="551">OPTIONS</text>
  142. <rect x="217" y="533" width="26" height="32" rx="10"/>
  143. <rect x="215"
  144. y="531"
  145. width="26"
  146. height="32"
  147. class="terminal"
  148. rx="10"/>
  149. <text class="terminal" x="225" y="551">(</text>
  150. <rect x="283" y="533" width="62" height="32"/>
  151. <rect x="281" y="531" width="62" height="32" class="nonterminal"/>
  152. <text class="nonterminal" x="291" y="551">option</text>
  153. <rect x="365" y="533" width="28" height="32" rx="10"/>
  154. <rect x="363"
  155. y="531"
  156. width="28"
  157. height="32"
  158. class="terminal"
  159. rx="10"/>
  160. <text class="terminal" x="373" y="551">=</text>
  161. <rect x="413" y="533" width="38" height="32"/>
  162. <rect x="411" y="531" width="38" height="32" class="nonterminal"/>
  163. <text class="nonterminal" x="421" y="551">val</text>
  164. <rect x="283" y="489" width="24" height="32" rx="10"/>
  165. <rect x="281"
  166. y="487"
  167. width="24"
  168. height="32"
  169. class="terminal"
  170. rx="10"/>
  171. <text class="terminal" x="291" y="507">,</text>
  172. <rect x="491" y="533" width="26" height="32" rx="10"/>
  173. <rect x="489"
  174. y="531"
  175. width="26"
  176. height="32"
  177. class="terminal"
  178. rx="10"/>
  179. <text class="terminal" x="499" y="551">)</text>
  180. <rect x="243" y="631" width="76" height="32" rx="10"/>
  181. <rect x="241"
  182. y="629"
  183. width="76"
  184. height="32"
  185. class="terminal"
  186. rx="10"/>
  187. <text class="terminal" x="251" y="649">HAVING</text>
  188. <rect x="339" y="631" width="48" height="32"/>
  189. <rect x="337" y="629" width="48" height="32" class="nonterminal"/>
  190. <text class="nonterminal" x="347" y="649">expr</text>
  191. <rect x="45" y="741" width="68" height="32" rx="10"/>
  192. <rect x="43"
  193. y="739"
  194. width="68"
  195. height="32"
  196. class="terminal"
  197. rx="10"/>
  198. <text class="terminal" x="53" y="759">ORDER</text>
  199. <rect x="133" y="741" width="40" height="32" rx="10"/>
  200. <rect x="131"
  201. y="739"
  202. width="40"
  203. height="32"
  204. class="terminal"
  205. rx="10"/>
  206. <text class="terminal" x="141" y="759">BY</text>
  207. <rect x="213" y="741" width="64" height="32"/>
  208. <rect x="211" y="739" width="64" height="32" class="nonterminal"/>
  209. <text class="nonterminal" x="221" y="759">col_ref</text>
  210. <rect x="317" y="773" width="50" height="32" rx="10"/>
  211. <rect x="315"
  212. y="771"
  213. width="50"
  214. height="32"
  215. class="terminal"
  216. rx="10"/>
  217. <text class="terminal" x="325" y="791">ASC</text>
  218. <rect x="317" y="817" width="58" height="32" rx="10"/>
  219. <rect x="315"
  220. y="815"
  221. width="58"
  222. height="32"
  223. class="terminal"
  224. rx="10"/>
  225. <text class="terminal" x="325" y="835">DESC</text>
  226. <rect x="435" y="773" width="106" height="32" rx="10"/>
  227. <rect x="433"
  228. y="771"
  229. width="106"
  230. height="32"
  231. class="terminal"
  232. rx="10"/>
  233. <text class="terminal" x="443" y="791">NULLS LAST</text>
  234. <rect x="435" y="817" width="110" height="32" rx="10"/>
  235. <rect x="433"
  236. y="815"
  237. width="110"
  238. height="32"
  239. class="terminal"
  240. rx="10"/>
  241. <text class="terminal" x="443" y="835">NULLS FIRST</text>
  242. <rect x="213" y="697" width="24" height="32" rx="10"/>
  243. <rect x="211"
  244. y="695"
  245. width="24"
  246. height="32"
  247. class="terminal"
  248. rx="10"/>
  249. <text class="terminal" x="221" y="715">,</text>
  250. <rect x="142" y="915" width="58" height="32" rx="10"/>
  251. <rect x="140"
  252. y="913"
  253. width="58"
  254. height="32"
  255. class="terminal"
  256. rx="10"/>
  257. <text class="terminal" x="150" y="933">LIMIT</text>
  258. <rect x="220" y="915" width="48" height="32"/>
  259. <rect x="218" y="913" width="48" height="32" class="nonterminal"/>
  260. <text class="nonterminal" x="228" y="933">expr</text>
  261. <rect x="328" y="915" width="74" height="32" rx="10"/>
  262. <rect x="326"
  263. y="913"
  264. width="74"
  265. height="32"
  266. class="terminal"
  267. rx="10"/>
  268. <text class="terminal" x="336" y="933">OFFSET</text>
  269. <rect x="422" y="915" width="66" height="32"/>
  270. <rect x="420" y="913" width="66" height="32" class="nonterminal"/>
  271. <text class="nonterminal" x="430" y="933">integer</text>
  272. <rect x="143" y="1001" width="66" height="32" rx="10"/>
  273. <rect x="141"
  274. y="999"
  275. width="66"
  276. height="32"
  277. class="terminal"
  278. rx="10"/>
  279. <text class="terminal" x="151" y="1019">UNION</text>
  280. <rect x="143" y="1045" width="98" height="32" rx="10"/>
  281. <rect x="141"
  282. y="1043"
  283. width="98"
  284. height="32"
  285. class="terminal"
  286. rx="10"/>
  287. <text class="terminal" x="151" y="1063">INTERSECT</text>
  288. <rect x="143" y="1089" width="76" height="32" rx="10"/>
  289. <rect x="141"
  290. y="1087"
  291. width="76"
  292. height="32"
  293. class="terminal"
  294. rx="10"/>
  295. <text class="terminal" x="151" y="1107">EXCEPT</text>
  296. <rect x="301" y="1033" width="46" height="32" rx="10"/>
  297. <rect x="299"
  298. y="1031"
  299. width="46"
  300. height="32"
  301. class="terminal"
  302. rx="10"/>
  303. <text class="terminal" x="309" y="1051">ALL</text>
  304. <rect x="301" y="1077" width="86" height="32" rx="10"/>
  305. <rect x="299"
  306. y="1075"
  307. width="86"
  308. height="32"
  309. class="terminal"
  310. rx="10"/>
  311. <text class="terminal" x="309" y="1095">DISTINCT</text>
  312. <rect x="427" y="1001" width="152" height="32"/>
  313. <rect x="425" y="999" width="152" height="32" class="nonterminal"/>
  314. <text class="nonterminal" x="435" y="1019">another_select_stmt</text>
  315. <path class="line"
  316. d="m17 17 h2 m0 0 h10 m74 0 h10 m20 0 h10 m0 0 h412 m-442 0 h20 m422 0 h20 m-462 0 q10 0 10 10 m442 0 q0 -10 10 -10 m-452 10 v12 m442 0 v-12 m-442 12 q0 10 10 10 m422 0 q10 0 10 -10 m-432 10 h10 m46 0 h10 m0 0 h356 m-432 -10 v20 m442 0 v-20 m-442 20 v68 m442 0 v-68 m-442 68 q0 10 10 10 m422 0 q10 0 10 -10 m-432 10 h10 m86 0 h10 m20 0 h10 m40 0 h10 m0 0 h10 m26 0 h10 m20 0 h10 m64 0 h10 m-104 0 l20 0 m-1 0 q-9 0 -9 -10 l0 -24 q0 -10 10 -10 m84 44 l20 0 m-20 0 q10 0 10 -10 l0 -24 q0 -10 -10 -10 m-84 0 h10 m24 0 h10 m0 0 h40 m20 44 h10 m26 0 h10 m-296 0 h20 m276 0 h20 m-316 0 q10 0 10 10 m296 0 q0 -10 10 -10 m-306 10 v14 m296 0 v-14 m-296 14 q0 10 10 10 m276 0 q10 0 10 -10 m-286 10 h10 m0 0 h266 m42 -154 l2 0 m2 0 l2 0 m2 0 l2 0 m-548 246 l2 0 m2 0 l2 0 m2 0 l2 0 m22 0 h10 m98 0 h10 m-138 0 l20 0 m-1 0 q-9 0 -9 -10 l0 -24 q0 -10 10 -10 m118 44 l20 0 m-20 0 q10 0 10 -10 l0 -24 q0 -10 -10 -10 m-118 0 h10 m24 0 h10 m0 0 h74 m20 44 h10 m60 0 h10 m20 0 h10 m88 0 h10 m-128 0 l20 0 m-1 0 q-9 0 -9 -10 l0 -24 q0 -10 10 -10 m108 44 l20 0 m-20 0 q10 0 10 -10 l0 -24 q0 -10 -10 -10 m-108 0 h10 m24 0 h10 m0 0 h64 m40 44 h10 m0 0 h88 m-118 0 h20 m98 0 h20 m-138 0 q10 0 10 10 m118 0 q0 -10 10 -10 m-128 10 v12 m118 0 v-12 m-118 12 q0 10 10 10 m98 0 q10 0 10 -10 m-108 10 h10 m78 0 h10 m22 -32 l2 0 m2 0 l2 0 m2 0 l2 0 m-542 142 l2 0 m2 0 l2 0 m2 0 l2 0 m22 0 h10 m0 0 h148 m-178 0 h20 m158 0 h20 m-198 0 q10 0 10 10 m178 0 q0 -10 10 -10 m-188 10 v12 m178 0 v-12 m-178 12 q0 10 10 10 m158 0 q10 0 10 -10 m-168 10 h10 m70 0 h10 m0 0 h10 m48 0 h10 m40 -32 h10 m70 0 h10 m0 0 h10 m40 0 h10 m20 0 h10 m64 0 h10 m-104 0 l20 0 m-1 0 q-9 0 -9 -10 l0 -24 q0 -10 10 -10 m84 44 l20 0 m-20 0 q10 0 10 -10 l0 -24 q0 -10 -10 -10 m-84 0 h10 m24 0 h10 m0 0 h40 m-274 44 h20 m274 0 h20 m-314 0 q10 0 10 10 m294 0 q0 -10 10 -10 m-304 10 v14 m294 0 v-14 m-294 14 q0 10 10 10 m274 0 q10 0 10 -10 m-284 10 h10 m0 0 h264 m22 -34 l2 0 m2 0 l2 0 m2 0 l2 0 m-512 142 l2 0 m2 0 l2 0 m2 0 l2 0 m22 0 h10 m84 0 h10 m0 0 h10 m26 0 h10 m20 0 h10 m62 0 h10 m0 0 h10 m28 0 h10 m0 0 h10 m38 0 h10 m-208 0 l20 0 m-1 0 q-9 0 -9 -10 l0 -24 q0 -10 10 -10 m188 44 l20 0 m-20 0 q10 0 10 -10 l0 -24 q0 -10 -10 -10 m-188 0 h10 m24 0 h10 m0 0 h144 m20 44 h10 m26 0 h10 m-444 0 h20 m424 0 h20 m-464 0 q10 0 10 10 m444 0 q0 -10 10 -10 m-454 10 v14 m444 0 v-14 m-444 14 q0 10 10 10 m424 0 q10 0 10 -10 m-434 10 h10 m0 0 h414 m22 -34 l2 0 m2 0 l2 0 m2 0 l2 0 m-358 66 l2 0 m2 0 l2 0 m2 0 l2 0 m22 0 h10 m0 0 h154 m-184 0 h20 m164 0 h20 m-204 0 q10 0 10 10 m184 0 q0 -10 10 -10 m-194 10 v12 m184 0 v-12 m-184 12 q0 10 10 10 m164 0 q10 0 10 -10 m-174 10 h10 m76 0 h10 m0 0 h10 m48 0 h10 m22 -32 l2 0 m2 0 l2 0 m2 0 l2 0 m-426 142 l2 0 m2 0 l2 0 m2 0 l2 0 m22 0 h10 m68 0 h10 m0 0 h10 m40 0 h10 m20 0 h10 m64 0 h10 m20 0 h10 m0 0 h68 m-98 0 h20 m78 0 h20 m-118 0 q10 0 10 10 m98 0 q0 -10 10 -10 m-108 10 v12 m98 0 v-12 m-98 12 q0 10 10 10 m78 0 q10 0 10 -10 m-88 10 h10 m50 0 h10 m0 0 h8 m-88 -10 v20 m98 0 v-20 m-98 20 v24 m98 0 v-24 m-98 24 q0 10 10 10 m78 0 q10 0 10 -10 m-88 10 h10 m58 0 h10 m40 -76 h10 m0 0 h120 m-150 0 h20 m130 0 h20 m-170 0 q10 0 10 10 m150 0 q0 -10 10 -10 m-160 10 v12 m150 0 v-12 m-150 12 q0 10 10 10 m130 0 q10 0 10 -10 m-140 10 h10 m106 0 h10 m0 0 h4 m-140 -10 v20 m150 0 v-20 m-150 20 v24 m150 0 v-24 m-150 24 q0 10 10 10 m130 0 q10 0 10 -10 m-140 10 h10 m110 0 h10 m-372 -76 l20 0 m-1 0 q-9 0 -9 -10 l0 -24 q0 -10 10 -10 m372 44 l20 0 m-20 0 q10 0 10 -10 l0 -24 q0 -10 -10 -10 m-372 0 h10 m24 0 h10 m0 0 h328 m-560 44 h20 m560 0 h20 m-600 0 q10 0 10 10 m580 0 q0 -10 10 -10 m-590 10 v90 m580 0 v-90 m-580 90 q0 10 10 10 m560 0 q10 0 10 -10 m-570 10 h10 m0 0 h550 m22 -110 l2 0 m2 0 l2 0 m2 0 l2 0 m-527 142 l2 0 m2 0 l2 0 m2 0 l2 0 m22 0 h10 m0 0 h136 m-166 0 h20 m146 0 h20 m-186 0 q10 0 10 10 m166 0 q0 -10 10 -10 m-176 10 v12 m166 0 v-12 m-166 12 q0 10 10 10 m146 0 q10 0 10 -10 m-156 10 h10 m58 0 h10 m0 0 h10 m48 0 h10 m40 -32 h10 m0 0 h170 m-200 0 h20 m180 0 h20 m-220 0 q10 0 10 10 m200 0 q0 -10 10 -10 m-210 10 v12 m200 0 v-12 m-200 12 q0 10 10 10 m180 0 q10 0 10 -10 m-190 10 h10 m74 0 h10 m0 0 h10 m66 0 h10 m22 -32 l2 0 m2 0 l2 0 m2 0 l2 0 m-449 86 l2 0 m2 0 l2 0 m2 0 l2 0 m22 0 h10 m0 0 h466 m-496 0 h20 m476 0 h20 m-516 0 q10 0 10 10 m496 0 q0 -10 10 -10 m-506 10 v12 m496 0 v-12 m-496 12 q0 10 10 10 m476 0 q10 0 10 -10 m-466 10 h10 m66 0 h10 m0 0 h32 m-138 0 h20 m118 0 h20 m-158 0 q10 0 10 10 m138 0 q0 -10 10 -10 m-148 10 v24 m138 0 v-24 m-138 24 q0 10 10 10 m118 0 q10 0 10 -10 m-128 10 h10 m98 0 h10 m-128 -10 v20 m138 0 v-20 m-138 20 v24 m138 0 v-24 m-138 24 q0 10 10 10 m118 0 q10 0 10 -10 m-128 10 h10 m76 0 h10 m0 0 h22 m40 -88 h10 m0 0 h96 m-126 0 h20 m106 0 h20 m-146 0 q10 0 10 10 m126 0 q0 -10 10 -10 m-136 10 v12 m126 0 v-12 m-126 12 q0 10 10 10 m106 0 q10 0 10 -10 m-116 10 h10 m46 0 h10 m0 0 h40 m-116 -10 v20 m126 0 v-20 m-126 20 v24 m126 0 v-24 m-126 24 q0 10 10 10 m106 0 q10 0 10 -10 m-116 10 h10 m86 0 h10 m20 -76 h10 m152 0 h10 m23 -32 h-3"/>
  317. <polygon points="617 983 625 979 625 987"/>
  318. <polygon points="617 983 609 979 609 987"/>
  319. </svg>