my friend could u explain me becaus this group by in my select query
doesn´t work,,
i have this table:
create table carrito (idusuario varchar(100),idproducto
varchar(100),cantidad int,precio float,transaccion int default 0,image
varchar(130));
if i do this : select idproducto,count(cantidad)as cantidad,sum(precio)as
subtotal from carrito where transaccion=0 and idusuario='david' group by
idproducto
IDPRODUCTOCANTIDAD SUBTOTALdc15 2 780dc17
1499dc01 1250dc11 2180dc16 1999
this works. but loook this: seelct * from carrito,, here i have the rout
of an imagen and when i try to do this::
its the same , but i want to show one more field witch is image
select image,idproducto,count(cantidad)as cantidad,sum(precio)as subtotal
from carrito where transaccion=0 and idusuario='david' group by idproducto
it doesn´t work ,,, shows me a meesage like this: ORA-00979: no es una
expresión GROUP BY
IDUSUARIOIDPRODUCTO CANTIDAD PRECIOTRANSACCIONIMAGE daviddc111900
images/deportes/ciclismo/anforatermica.jpg daviddc111900
images/deportes/ciclismo/anforatermica.jpg daviddc1513900
images/deportes/ciclismo/multiplicadora.jpg daviddc1619990
images/deportes/ciclismo/portabici.jpg daviddc1714990
images/deportes/ciclismo/rines.jpg daviddc1513900
images/deportes/ciclismo/multiplicadora.jpg daviddc0112500
images/deportes/ciclismo/casco.jpg
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.