Not A Single Group Group Function Error In Oracle
When I take it out it works fine. For example, a small business CEO wants to view employees who worked the highest number of hours by department last month. SELECT ApplicationNo,COUNT(*),AVG(B.Modulesize) FROM APPLICATIONMODULE A,MODULE B WHERE A.ModuleNo = B.Moduleno; Here are the tables that are used: CREATE TABLE MODULE (Moduleno Number constraint pk_no PRIMARY KEY, Modulename VARCHAR2(60) NOT NULL, Modulesize Question was; find cheapest company for each city such that more than 1 company travels to the city? http://themedemo.net/not-a/not-a-single-group-function-error-in-oracle.html
asked 6 months ago viewed 257 times active 1 month ago Related 2Use of hash functions in group by?3Pivoting data for stacked charts (grouping and creating new columns for each distinct more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed A witcher and their apprentice… A crime has been committed! ...so here is a riddle Hard to compute real numbers Output the Hebrew alphabet more hot questions question feed lang-sql about What is this strange almost symmetrical location in Nevada?
Not A Single-group Group Function Count
I can't understand what is mistake? FacebookTwitterYoutubeLinkedinMailHome About Us Leadership Partners Community Service Business Referrals Careers Open Positions Newsroom Blog TekTalk Webinar Replays Contact Us CHAT NOW 844-TEK-STRM Software Services Oracle WebCenter Content Digital Records Management Enterprise All legitimate Oracle experts publish their Oracle qualifications. CREATE TABLE route ( route_id number(4) not null PRIMARY KEY, origin varchar2(25) not null, destination varchar2(25) not null); table created.
Reply With Quote 03-29-04,18:13 #2 r937 View Profile View Forum Posts Visit Homepage SQL Consultant Join Date Apr 2002 Location Toronto, Canada Posts 20,002 SELECT ApplicationNo,COUNT(*),AVG(B.Modulesize) FROM APPLICATIONMODULE A,MODULE B WHERE We use advertisements to support this website and fund the development of new content. more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed Ora-00937 Not A Single-group Group Function Example What happened to the "greater enemy" plot of Old Republic series?
Cause: 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 GROUP BY is used in conjunction with aggregate functions to filter the results by a value. The Solution To resolve the error, you can either remove the group function or column expression from the SELECT clause or you can add a GROUP BY clause that includes the What's the source for the Point Buy alternative ability score rules?
In other words, you tried to execute a SELECT statement that requires a GROUP BY clause without including the GROUP BY clause. Ora-00937 Not A Single-group Group Function Max Short story about a moon of Mars whose orbit is only a few feet up Thesis reviewer requests update to literature review to incorporate last four years of research. It is commonly used, which deems it essential to utilize the proper syntax when running the statement. The Problem When faced with ORA-00923, the error message you will see In such cases, the user may run a GROUP BY statement to view the results.
- What one can do if boss ask to do an impossible thing?
- Results 1 to 3 of 3 Thread: not a single-group group function-HELP???
- Is Morrowind based on a tabletop RPG?
- If you want to get all the ones tied for first I believe you'll need nested queries, one to get the max time then another to pull back all the ones
- Why does every T-800 Terminator sent back look like this?
- In other words, you tried to execute a SELECT statement that requires a GROUP BY clause without including the GROUP BY clause.
- How long could the sun be turned off without overly damaging planet Earth + humanity?
- ORA-00001: unique constraint violated ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired ORA-00257: archiver error ORA-00600: internal error ORA-00604: error occurred at recursive SQL level 1 ORA-00900: invalid
- FacebookTwitterYoutubeLinkedinMailHome About Us Leadership Partners Community Service Business Referrals Careers Open Positions Newsroom Blog TekTalk Webinar Replays Contact Us CHAT NOW 844-TEK-STRM Software Services Oracle WebCenter Content Digital Records Management Enterprise
Not A Single-group Group Function Max
I agree that it's very likely that this is not what he is after - your answer is probably the way to go. –a_horse_with_no_name Apr 23 '13 at 7:43 add a check over here mysqldump -u user -pdba my_schema my_table > table.sql - post the INSERT INTO My_Table VALUES(....) here. Browse other questions tagged oracle oracle-11g-r2 group-by or ask your own question. SELECT Journey.Journey_No, Stages.Stage_ID, SUM(Stages.Distance_Between) FROM Journey, Journey_Stages, Stages WHERE Journey.Journey_No=Journey_Stages.Journey_No AND Journey_Stages.Stage_ID=Stages.Stage_ID; Tables are as followed: CREATE TABLE Journey_Stages(Journey_No integer REFERENCES Journey(Journey_No),Stage_ID integer REFERENCES Stages(Stage_ID)); CREATE TABLE Stages(Stage_ID integer PRIMARY KEY, Not A Group By Function
AVG, COUNT, MAX, MIN…), you must have a GROUP BY clause. Hard to compute real numbers How to find out if Windows was running at a given time? What one can do if boss ask to do an impossible thing? his comment is here Has GRRM admitted Historical Influences?
The GROUP BY command can be very useful for viewing a select set of results.
Not the answer you're looking for? However what if there are customers who are tied for having the maximum amount of downloads? –Tomek Nov 25 '09 at 7:29 If there was multiple with the same Not the answer you're looking for? Nested Group Function Without Group By The Solution To resolve the error, you can either remove the group function or column expression from the SELECT clause or you can add a GROUP BY clause that includes the
share|improve this answer answered Apr 23 '13 at 7:35 Colin 't Hart 5,02082131 add a comment| up vote 3 down vote You should do one of two things: OPTION #1: Keep For example, if you had tried to execute the following SELECT statement: SELECT department, MIN(salary) AS "Lowest salary" FROM employees; You would receive the following error message: You could correct this If this is your first visit, be sure to check out the FAQ by clicking the link above. weblink Burleson Consulting The Oracle of Database Support Oracle Performance Tuning Remote DBA Services Copyright © 1996 - 2016 All rights reserved by Burleson Oracle is the registered trademark of
JFK to New Jersey on a student's budget Is Morrowind based on a tabletop RPG? Powered by vBulletinCopyright ©2000 - 2016, Jelsoft Enterprises Ltd.Forum Answers by - Gio~Logist - Vbulletin Solutions & Services Home Register New Posts Advertising Archive Privacy Statement Sitemap Top Hosting and Cloud Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review –RolandoMySQLDBA Apr 11 at asked 3 years ago viewed 11164 times active 3 years ago Related 3Why can't we specify group functions in Oracle in the where clause?4Atypical problem with ORA-014454ORA-00979: not a group by