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

  • <tfoot id='Kzn8n'></tfoot>
      <bdo id='Kzn8n'></bdo><ul id='Kzn8n'></ul>

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

        <legend id='Kzn8n'><style id='Kzn8n'><dir id='Kzn8n'><q id='Kzn8n'></q></dir></style></legend>

        计算唯一值的数量

        Count number of unique values(计算唯一值的数量)

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

          <legend id='C3Jn9'><style id='C3Jn9'><dir id='C3Jn9'><q id='C3Jn9'></q></dir></style></legend>
              <bdo id='C3Jn9'></bdo><ul id='C3Jn9'></ul>
            • <tfoot id='C3Jn9'></tfoot>

                <tbody id='C3Jn9'></tbody>
                  <i id='C3Jn9'><tr id='C3Jn9'><dt id='C3Jn9'><q id='C3Jn9'><span id='C3Jn9'><b id='C3Jn9'><form id='C3Jn9'><ins id='C3Jn9'></ins><ul id='C3Jn9'></ul><sub id='C3Jn9'></sub></form><legend id='C3Jn9'></legend><bdo id='C3Jn9'><pre id='C3Jn9'><center id='C3Jn9'></center></pre></bdo></b><th id='C3Jn9'></th></span></q></dt></tr></i><div id='C3Jn9'><tfoot id='C3Jn9'></tfoot><dl id='C3Jn9'><fieldset id='C3Jn9'></fieldset></dl></div>
                  本文介绍了计算唯一值的数量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  如果我有三列:

                  orderNumber, name, email
                  

                  我想计算表格中有多少独特的电子邮件,我该怎么做?

                  and I would like to count how many unique emails are in the table how would I go about doing so?

                  这样的声明:

                  SELECT count(email) FROM orders
                  

                  给我总数.

                  我试过SELECT DISTINCT count(email) FROM orders

                  但这似乎并没有给我我期望的数字.

                  but that does not seem to be giving me the numbers I am expecting.

                  推荐答案

                  使用

                  SELECT count( DISTINCT(email) ) FROM orders
                  

                  Distinct 提供唯一的电子邮件 ID,然后简单地对其进行计数.

                  Distinct provide unique email ids and then simply count them.

                  这篇关于计算唯一值的数量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  ibtmp1是非压缩的innodb临时表的独立表空间,通过innodb_temp_data_file_path参数指定文件的路径,文件名和大小,默认配置为ibtmp1:12M:autoextend,也就是说在文件系统磁盘足够的情况下,这个文件大小是可以无限增长的。 为了避免ibtmp1文件无止境的暴涨导致
                  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 按组最频繁)
                  Why Mysql#39;s Group By and Oracle#39;s Group by behaviours are different(为什么 Mysql 的 Group By 和 Oracle 的 Group by 行为不同)
                  MySQL GROUP BY DateTime +/- 3 seconds(MySQL GROUP BY DateTime +/- 3 秒)
                    • <i id='rIhvr'><tr id='rIhvr'><dt id='rIhvr'><q id='rIhvr'><span id='rIhvr'><b id='rIhvr'><form id='rIhvr'><ins id='rIhvr'></ins><ul id='rIhvr'></ul><sub id='rIhvr'></sub></form><legend id='rIhvr'></legend><bdo id='rIhvr'><pre id='rIhvr'><center id='rIhvr'></center></pre></bdo></b><th id='rIhvr'></th></span></q></dt></tr></i><div id='rIhvr'><tfoot id='rIhvr'></tfoot><dl id='rIhvr'><fieldset id='rIhvr'></fieldset></dl></div>
                      <legend id='rIhvr'><style id='rIhvr'><dir id='rIhvr'><q id='rIhvr'></q></dir></style></legend>

                      • <tfoot id='rIhvr'></tfoot>
                        • <bdo id='rIhvr'></bdo><ul id='rIhvr'></ul>

                          1. <small id='rIhvr'></small><noframes id='rIhvr'>

                              <tbody id='rIhvr'></tbody>