Another instance could be when a school superintendent wants to view students on the honor roll by homeroom. Also, ORA-00937 may be occurring because of your SELECT clause. Try our newsletter Sign up for our newsletter and get our top new questions delivered to your inbox (see an example). Using only one cpu core "Surprising" examples of Markov chains Criminals/hackers trick computer system into backing up all data into single location Query Author Apex Permission? http://kreativexpert.com/not-a/not-a-group-by-expression-sql.html
Not the answer you're looking for? 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 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 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
Even though the process of correcting this error is not too difficult, contact your database administrator or licensed Oracle consultant if you continue to face problems with ORA-00937. For example, a small business CEO wants to view employees who worked the highest number of hours by department last month. When I take it out it works fine. Ora-00937 Not A Single-group Group Function Example We use advertisements to support this website and fund the development of new content.
Question was; find cheapest company for each city such that more than 1 company travels to the city? Not A Single-group Group Function Max The time now is 17:12. Option #3 Remove the expression from the SELECT list that was not in the GROUP BY clause. Browse other questions tagged sql oracle or ask your own question.
Criminals/hackers trick computer system into backing up all data into single location Using only one cpu core Word for "to direct attention away from" more hot questions question feed lang-sql about Ora-00937 Not A Single-group Group Function Max SELECT LGBRAND.BRAND_ID, LGBRAND.BRAND_NAME, AVG(LGPRODUCT.PROD_PRICE)AS AVGER FROM LGPRODUCT, LGBRAND WHERE LGPRODUCT.BRAND_ID = LGBRAND.BRAND_ID GROUP BY LGBRAND.BRAND_ID, LGBRAND.BRAND_NAME ORDER BY BRAND_NAME share|improve this answer answered Nov 26 '13 at 2:40 Andrew 4,5411726 add When to bore a block during a rebuild? Browse other questions tagged sql oracle group-by sum max or ask your own question.
Also provide sample data from tickets table. –JSapkota Apr 11 at 10:41 You need to group by every non-aggregate column of your query, : GROUP BY by bus, dest Could anyone guide in the right direction? -Tomek EDIT: TIME in this database refers to the number of times downloaded sql oracle group-by sum max share|improve this question edited Jun 8 Not A Single-group Group Function Count 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 Not A Single-group Group Function Sum You may also want to rename the subquery table aliases I've used here to make them more meaningful.
Output the ALONED numbers Criminals/hackers trick computer system into backing up all data into single location Measuring air density - where is my huge error coming from? this content Feel free to ask questions on our Oracle forum. How to explain the existence of just one religion? 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 Not A Group By Function
Limited number of places at award ceremony for team - how do I choose who to take along? In other words, you tried to execute a SELECT statement that requires a GROUP BY clause without including the GROUP BY clause. 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 weblink I think it's going to be trick with what you've given us - for example, how do I tell the difference between Bursa-> Izmir and Hatay-> Izmir?
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 Single-group Group Function Avg Not sure what SQL database server you're using but I suspect you want a query more like this (Written with a MSSQL background - may need some translating to the sql My command; SQL> select tickets.bus_id bus, tickets.fare fare, route.destination dest from tickets left join route on route.route_id=tickets.route_id; BUS FARE DEST ---------- ---------- ------------------------- 11 21.36 Kayseri 1 23.32 Kayseri 1 63.32
Most my experience is TSQL. –fyjham Nov 25 '09 at 7:38 nice, having worked. up vote 2 down vote SELECT LGBRAND.BRAND_ID, LGBRAND.BRAND_NAME, AVG(LGPRODUCT.PROD_PRICE)AS AVGER FROM LGPRODUCT, LGBRAND WHERE LGPRODUCT.BRAND_ID = LGBRAND.BRAND_ID GROUP BY LGBRAND.BRAND_ID, LGBRAND.BRAND_NAME ORDER BY BRAND_NAME; OR SELECT LGBRAND.BRAND_ID, LGBRAND.BRAND_NAME, AVG(LGPRODUCT.PROD_PRICE)AS AVGER FROM A witcher and their apprentice… Is Morrowind based on a tabletop RPG? Nested Group Function Without Group By Forgot your password?
Copyright © 2003-2016 TechOnTheNet.com. In such cases, the user may run a GROUP BY statement to view the results. How to securely erase with Disk Utility on El Capitan & Sierra What happened to the "greater enemy" plot of Old Republic series? check over here For the query to run successfully you must either remove the group function or column expression from SELECT or you must add a GROUP BY clause that includes the column expression.