<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 如何工作?

        How does GROUP BY work?(GROUP BY 如何工作?)

            <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 如何工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  ibtmp1是非压缩的innodb临时表的独立表空间,通过innodb_temp_data_file_path参数指定文件的路径,文件名和大小,默认配置为ibtmp1:12M:autoextend,也就是说在文件系统磁盘足够的情况下,这个文件大小是可以无限增长的。 为了避免ibtmp1文件无止境的暴涨导致
                  SQL query to group by day(按天分组的 SQL 查询)
                  What does SQL clause quot;GROUP BY 1quot; mean?(SQL 子句“GROUP BY 1是什么意思?意思是?)
                  MySQL groupwise MAX() returns unexpected results(MySQL groupwise MAX() 返回意外结果)
                  MySQL SELECT most frequent by group(MySQL SELECT 按组最频繁)
                  Include missing months in Group By query(在 Group By 查询中包含缺失的月份)

                  • <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>
                          <tbody id='yPoOR'></tbody>
                        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'>