help needed [message #302171] |
Sun, 24 February 2008 08:15  |
dsa09
Messages: 7 Registered: February 2008
|
Junior Member |
|
|
hi ppl i have a question to ask
i've the following sql query below but i want the output to be group as sum(price) but i'm just not able to do it, need some help over here
select diner,odate,serves.price from ordera3, serves where diner='JANUSZ' and odate='17-jan-2007';
|
|
|
|
|
Re: help needed [message #302205 is a reply to message #302171] |
Sun, 24 February 2008 21:41   |
dsa09
Messages: 7 Registered: February 2008
|
Junior Member |
|
|
select diner,odate,SUM(serves.price) from ordera3, serves where diner='JANUSZ' and odate='14-jan-2007';
It gives me an error " ORA-00937: not a single-group group function "
|
|
|
Re: help needed [message #302207 is a reply to message #302171] |
Sun, 24 February 2008 21:56   |
dsa09
Messages: 7 Registered: February 2008
|
Junior Member |
|
|
SQL> select diner,odate,sum(serves.price) from ordera3, serves where diner='JANU
SZ' and odate='14-jan-2007';
select diner,odate,sum(serves.price) from ordera3, serves where diner='JANUSZ' a
nd odate='14-jan-2007'
*
ERROR at line 1:
ORA-00937: not a single-group group function
|
|
|
|
|
|
Re: help needed [message #302324 is a reply to message #302287] |
Mon, 25 February 2008 04:30  |
 |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
It would be nice if you post the code so that other forum members might benefit from it.
|
|
|