ora-00937

Show sum of all for every record

Say you have table of some items with these two columns: ItemName Price ....where ItemName is unique. How do you show sum of all prices for every ItemName (I'm using Oracle)? If I just try this: SELECT ItemName, SUM(Price) FROM Items I get this error: ORA-00937: not a single-group group function ...which goes a...

How to resolve ORA-00937: not a single-group group function when calculating percentage?

I'm trying to get a percentage of the itemid that are available in a certain area. Using my query, I get an error ORA-00937: not a single-group group function All the details: I have these two tables: ALLITEMS --------------- ItemId | Areas --------------- 1 | EAST 2 | EAST 3 | SOUTH 4 | WEST CURRENTITEMS ---...

not single-group grouping function while using regr_slope

HI I try to run : select year, regr_slope(sum(sale_count),year) as slope, from products group by year It throws "00937. 00000 - "not a single-group group function"" .When i delete year from select clause problem disapears. Shouldn't I be able to select column with which I'm grouping? Oracle 11.2 sqldeveloper ty for help ! ...

Follow-Up Help with a SQL Query

I asked something similar a few days ago, here is my issue. My professor has phrased the following question: Find the average ratings of all movies playing at each theatre. Display the theatre name and the computed rating. Order the results ascending by rating. Here is how my tables are structured: CREATE TABLE Theatres ( Name var...