zoukankan      html  css  js  c++  java
  • ORA00937: not a singlegroup group function

    A SELECT list cannot include both a group function, such as AVG, COUNT, MAX, MIN, SUM, STDDEV, or VARIANCE, and an individual column expression, unless the individual column expression is included in a GROUP BY clause.



    Drop either the group function or the individual column expression from the SELECT list or add a GROUP BY clause that includes all individual column expressions listed.


    eg:

    SQL> select owner, count(*)
    2 from dba_segments;
    select owner, count(*)
    *
    ERROR at line 1:
    ORA-00937: not a single-group group function

    Because we have a group function (COUNT) in our column list, and an additional column (OWNER), we have to include the GROUP BY clause in our select statement.


    SQL> select owner, count(*)
    2 from dba_segments
    3 group by owner;

    OWNER COUNT(*)
    ------------------------------ ----------
    USER1 166
    USER2 166

  • 相关阅读:
    文件的上传下载
    HttpServletResponse
    HttpServletRequest
    web工程中URL地址的推荐写法
    servlet二
    Servlet
    HTTP-崔希凡笔记
    HTTP协议-引自孤傲苍狼博客
    浏览器与服务器交互的过程
    Tomcat 配置
  • 原文地址:https://www.cnblogs.com/xuewater/p/2640936.html
Copyright © 2011-2022 走看看