久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長(zhǎng)資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      MySQL分組后,如何統(tǒng)計(jì)記錄條數(shù)

      MySQL分組后,統(tǒng)計(jì)記錄條數(shù)的方法:1、統(tǒng)計(jì)記錄條數(shù),代碼為【SELECT num,count(*) AS counts from test_a GROUP BY num】;2、對(duì)num去重后的數(shù)量的統(tǒng)計(jì)。

      MySQL分組后,如何統(tǒng)計(jì)記錄條數(shù)

      MySQL分組后,統(tǒng)計(jì)記錄條數(shù)的方法:

      分組后,統(tǒng)計(jì)記錄條數(shù):

      SELECT num,count(*) AS counts from test_a GROUP BY num;

      查詢(xún)結(jié)果如下:

      MySQL分組后,如何統(tǒng)計(jì)記錄條數(shù)

      對(duì)num去重后的數(shù)量的統(tǒng)計(jì):

        SELECT count(t.counts) FROM ( SELECT num,count(*) AS counts from test_a GROUP BY num ) AS t;   SELECT count(DISTINCT num) AS count FROM test_a;

        它倆結(jié)果一樣,都是5;只是一個(gè)是子查詢(xún)(嵌套),一個(gè)是內(nèi)置函數(shù) distinct();

      數(shù)據(jù)庫(kù)結(jié)構(gòu)

      MySQL分組后,如何統(tǒng)計(jì)記錄條數(shù)

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)