<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>

        计算唯一值的数量

        时间:2023-06-01

          <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.

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

                  上一篇:使用复合主键作为外键 下一篇:MySQL:如何多次加入同一个表?

                  相关文章

                  1. <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>

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

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