simple-group-by-having.svg 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2. <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
  3. "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
  4. <!-- Generated by graphviz version 2.43.0 (0)
  5. -->
  6. <!-- Title: G Pages: 1 -->
  7. <svg width="940pt" height="638pt"
  8. viewBox="0.00 0.00 940.00 638.38" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
  9. <g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 634.38)">
  10. <title>G</title>
  11. <polygon fill="white" stroke="transparent" points="-4,4 -4,-634.38 936,-634.38 936,4 -4,4"/>
  12. <text text-anchor="middle" x="226.5" y="-7.8" font-family="Times,serif" font-size="14.00">select f1 from t group by f1 having f1 &gt; 10; (before rewrites)</text>
  13. <g id="clust1" class="cluster">
  14. <title>cluster3</title>
  15. <polygon fill="none" stroke="black" points="398,-509.29 398,-622.38 924,-622.38 924,-509.29 398,-509.29"/>
  16. <text text-anchor="middle" x="448.5" y="-607.18" font-family="Times,serif" font-size="14.00">Box3:Select</text>
  17. </g>
  18. <g id="clust3" class="cluster">
  19. <title>cluster2</title>
  20. <polygon fill="none" stroke="black" points="194,-358.29 194,-490.29 600,-490.29 600,-358.29 194,-358.29"/>
  21. <text text-anchor="middle" x="256" y="-475.09" font-family="Times,serif" font-size="14.00">Box2:Grouping</text>
  22. </g>
  23. <g id="clust5" class="cluster">
  24. <title>cluster0</title>
  25. <polygon fill="none" stroke="black" points="22,-182 22,-339.29 320,-339.29 320,-182 22,-182"/>
  26. <text text-anchor="middle" x="72.5" y="-324.09" font-family="Times,serif" font-size="14.00">Box0:Select</text>
  27. </g>
  28. <g id="clust7" class="cluster">
  29. <title>cluster1</title>
  30. <polygon fill="none" stroke="black" points="8,-31 8,-163 170,-163 170,-31 8,-31"/>
  31. <text text-anchor="middle" x="79.5" y="-147.8" font-family="Times,serif" font-size="14.00">Box1:BaseTable T</text>
  32. </g>
  33. <!-- boxhead3 -->
  34. <g id="node1" class="node">
  35. <title>boxhead3</title>
  36. <polygon fill="none" stroke="black" points="618.5,-519.84 618.5,-588.84 915.5,-588.84 915.5,-519.84 618.5,-519.84"/>
  37. <text text-anchor="middle" x="767" y="-573.64" font-family="Times,serif" font-size="14.00">Distinct: Preserve</text>
  38. <polyline fill="none" stroke="black" points="618.5,-565.84 915.5,-565.84 "/>
  39. <text text-anchor="middle" x="767" y="-550.64" font-family="Times,serif" font-size="14.00">0: Q2.c0 as F1</text>
  40. <polyline fill="none" stroke="black" points="618.5,-542.84 915.5,-542.84 "/>
  41. <text text-anchor="middle" x="767" y="-527.64" font-family="Times,serif" font-size="14.00">UNIQUE KEY [0]</text>
  42. </g>
  43. <!-- Q2 -->
  44. <g id="node2" class="node">
  45. <title>Q2</title>
  46. <ellipse fill="none" stroke="black" cx="443" cy="-554.34" rx="37.09" ry="37.09"/>
  47. <text text-anchor="middle" x="443" y="-550.64" font-family="Times,serif" font-size="14.00">Q2(F)</text>
  48. </g>
  49. <!-- Q2&#45;&gt;Q2 -->
  50. <g id="edge1" class="edge">
  51. <title>Q2&#45;&gt;Q2</title>
  52. <path fill="none" stroke="black" d="M478.74,-564.45C489.58,-564.19 498.05,-560.82 498.05,-554.34 498.05,-547.85 489.58,-544.48 478.74,-544.23"/>
  53. <text text-anchor="middle" x="549.05" y="-550.64" font-family="Times,serif" font-size="14.00">(Q2.c0) &gt; (10)</text>
  54. </g>
  55. <!-- boxhead2 -->
  56. <g id="node3" class="node">
  57. <title>boxhead2</title>
  58. <polygon fill="none" stroke="black" points="294.5,-366.79 294.5,-458.79 591.5,-458.79 591.5,-366.79 294.5,-366.79"/>
  59. <text text-anchor="middle" x="443" y="-443.59" font-family="Times,serif" font-size="14.00">Distinct: Preserve</text>
  60. <polyline fill="none" stroke="black" points="294.5,-435.79 591.5,-435.79 "/>
  61. <text text-anchor="middle" x="443" y="-420.59" font-family="Times,serif" font-size="14.00">0: Q1.c0 as F1</text>
  62. <polyline fill="none" stroke="black" points="294.5,-412.79 591.5,-412.79 "/>
  63. <text text-anchor="middle" x="443" y="-397.59" font-family="Times,serif" font-size="14.00">GROUP Q1.c0 Ascending</text>
  64. <polyline fill="none" stroke="black" points="294.5,-389.79 591.5,-389.79 "/>
  65. <text text-anchor="middle" x="443" y="-374.59" font-family="Times,serif" font-size="14.00">UNIQUE KEY [0]</text>
  66. </g>
  67. <!-- Q2&#45;&gt;boxhead2 -->
  68. <g id="edge2" class="edge">
  69. <title>Q2&#45;&gt;boxhead2</title>
  70. <path fill="none" stroke="black" stroke-dasharray="5,2" d="M443,-517.04C443,-508.73 443,-499.59 443,-490.29"/>
  71. </g>
  72. <!-- Q1 -->
  73. <g id="node4" class="node">
  74. <title>Q1</title>
  75. <ellipse fill="none" stroke="black" cx="239" cy="-412.79" rx="37.09" ry="37.09"/>
  76. <text text-anchor="middle" x="239" y="-409.09" font-family="Times,serif" font-size="14.00">Q1(F)</text>
  77. </g>
  78. <!-- boxhead0 -->
  79. <g id="node5" class="node">
  80. <title>boxhead0</title>
  81. <polygon fill="none" stroke="black" points="166,-203.14 166,-295.14 312,-295.14 312,-203.14 166,-203.14"/>
  82. <text text-anchor="middle" x="239" y="-279.94" font-family="Times,serif" font-size="14.00">Distinct: Preserve</text>
  83. <polyline fill="none" stroke="black" points="166,-272.14 312,-272.14 "/>
  84. <text text-anchor="middle" x="239" y="-256.94" font-family="Times,serif" font-size="14.00">0: Q0.c0 as F1</text>
  85. <polyline fill="none" stroke="black" points="166,-249.14 312,-249.14 "/>
  86. <text text-anchor="middle" x="239" y="-233.94" font-family="Times,serif" font-size="14.00">1: Q0.c1 as F2</text>
  87. <polyline fill="none" stroke="black" points="166,-226.14 312,-226.14 "/>
  88. <text text-anchor="middle" x="239" y="-210.94" font-family="Times,serif" font-size="14.00">2: Q0.c2 as F3</text>
  89. </g>
  90. <!-- Q1&#45;&gt;boxhead0 -->
  91. <g id="edge3" class="edge">
  92. <title>Q1&#45;&gt;boxhead0</title>
  93. <path fill="none" stroke="black" stroke-dasharray="5,2" d="M239,-375.51C239,-364.59 239,-352.08 239,-339.29"/>
  94. </g>
  95. <!-- Q0 -->
  96. <g id="node6" class="node">
  97. <title>Q0</title>
  98. <ellipse fill="none" stroke="black" cx="89" cy="-249.14" rx="59.29" ry="59.29"/>
  99. <text text-anchor="middle" x="89" y="-245.44" font-family="Times,serif" font-size="14.00">Q0(F) as T</text>
  100. </g>
  101. <!-- boxhead1 -->
  102. <g id="node7" class="node">
  103. <title>boxhead1</title>
  104. <polygon fill="none" stroke="black" points="16,-39.5 16,-131.5 162,-131.5 162,-39.5 16,-39.5"/>
  105. <text text-anchor="middle" x="89" y="-116.3" font-family="Times,serif" font-size="14.00">Distinct: Preserve</text>
  106. <polyline fill="none" stroke="black" points="16,-108.5 162,-108.5 "/>
  107. <text text-anchor="middle" x="89" y="-93.3" font-family="Times,serif" font-size="14.00">0: c0 as F1</text>
  108. <polyline fill="none" stroke="black" points="16,-85.5 162,-85.5 "/>
  109. <text text-anchor="middle" x="89" y="-70.3" font-family="Times,serif" font-size="14.00">1: c1 as F2</text>
  110. <polyline fill="none" stroke="black" points="16,-62.5 162,-62.5 "/>
  111. <text text-anchor="middle" x="89" y="-47.3" font-family="Times,serif" font-size="14.00">2: c2 as F3</text>
  112. </g>
  113. <!-- Q0&#45;&gt;boxhead1 -->
  114. <g id="edge4" class="edge">
  115. <title>Q0&#45;&gt;boxhead1</title>
  116. <path fill="none" stroke="black" stroke-dasharray="5,2" d="M89,-189.79C89,-181.08 89,-172.01 89,-163"/>
  117. </g>
  118. </g>
  119. </svg>