<bdo id='3jbfR'></bdo><ul id='3jbfR'></ul>

      1. <small id='3jbfR'></small><noframes id='3jbfR'>

      2. <legend id='3jbfR'><style id='3jbfR'><dir id='3jbfR'><q id='3jbfR'></q></dir></style></legend>
      3. <tfoot id='3jbfR'></tfoot>

        <i id='3jbfR'><tr id='3jbfR'><dt id='3jbfR'><q id='3jbfR'><span id='3jbfR'><b id='3jbfR'><form id='3jbfR'><ins id='3jbfR'></ins><ul id='3jbfR'></ul><sub id='3jbfR'></sub></form><legend id='3jbfR'></legend><bdo id='3jbfR'><pre id='3jbfR'><center id='3jbfR'></center></pre></bdo></b><th id='3jbfR'></th></span></q></dt></tr></i><div id='3jbfR'><tfoot id='3jbfR'></tfoot><dl id='3jbfR'><fieldset id='3jbfR'></fieldset></dl></div>

        GROUP BY 如何工作?

        时间:2023-09-20

            <i id='4p8FK'><tr id='4p8FK'><dt id='4p8FK'><q id='4p8FK'><span id='4p8FK'><b id='4p8FK'><form id='4p8FK'><ins id='4p8FK'></ins><ul id='4p8FK'></ul><sub id='4p8FK'></sub></form><legend id='4p8FK'></legend><bdo id='4p8FK'><pre id='4p8FK'><center id='4p8FK'></center></pre></bdo></b><th id='4p8FK'></th></span></q></dt></tr></i><div id='4p8FK'><tfoot id='4p8FK'></tfoot><dl id='4p8FK'><fieldset id='4p8FK'></fieldset></dl></div>
          1. <tfoot id='4p8FK'></tfoot>

              <small id='4p8FK'></small><noframes id='4p8FK'>

                <tbody id='4p8FK'></tbody>
                  <bdo id='4p8FK'></bdo><ul id='4p8FK'></ul>
                  <legend id='4p8FK'><style id='4p8FK'><dir id='4p8FK'><q id='4p8FK'></q></dir></style></legend>
                  本文介绍了GROUP BY 如何工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  假设我有一个带有属性的表 Tab1 - a1a2 等等.没有一个属性是唯一的.

                  Suppose I have a table Tab1 with attributes - a1, a2, ... etc. None of the attributes are unique.

                  以下查询的性质是什么?它会始终返回一行吗?

                  What will be the nature of the following query? Will it return a single row always?

                  SELECT a1, a2, sum(a3) FROM Tab1 GROUP BY a1, a2
                  

                  推荐答案

                  GROUP BYGROUP BY 字段的每个唯一组合返回一行.因此,在您的示例中, (a1, a2) 出现在 Tab1 行中的每个不同组合都会导致查询中的一行代表具有给定组合的行组按字段值分组.SUM() 等聚合函数是针对每个组的成员计算的.

                  GROUP BY returns a single row for each unique combination of the GROUP BY fields. So in your example, every distinct combination of (a1, a2) occurring in rows of Tab1 results in a row in the query representing the group of rows with the given combination of group by field values . Aggregate functions like SUM() are computed over the members of each group.

                  这篇关于GROUP BY 如何工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何在 Oracle 中的表中查找重复值? 下一篇:Oracle SQL - 如何检索列的最高 5 个值

                  相关文章

                • <legend id='yPoOR'><style id='yPoOR'><dir id='yPoOR'><q id='yPoOR'></q></dir></style></legend>

                    <bdo id='yPoOR'></bdo><ul id='yPoOR'></ul>
                  <tfoot id='yPoOR'></tfoot>
                  1. <i id='yPoOR'><tr id='yPoOR'><dt id='yPoOR'><q id='yPoOR'><span id='yPoOR'><b id='yPoOR'><form id='yPoOR'><ins id='yPoOR'></ins><ul id='yPoOR'></ul><sub id='yPoOR'></sub></form><legend id='yPoOR'></legend><bdo id='yPoOR'><pre id='yPoOR'><center id='yPoOR'></center></pre></bdo></b><th id='yPoOR'></th></span></q></dt></tr></i><div id='yPoOR'><tfoot id='yPoOR'></tfoot><dl id='yPoOR'><fieldset id='yPoOR'></fieldset></dl></div>

                      <small id='yPoOR'></small><noframes id='yPoOR'>