i have a small app that reads a forecourt program's database. i want to get the current shift's info from that and display/print it out.

SELECT name, liters, amount FROM salemast ORDER BY name

the above statement was my first idea, but that didn't add them. just got a long list of all sales in alphabetical order. pft.

SELECT name, SUM(liters), SUM(amount) FROM salemast ORDER BY name

the next statement just gave me one name and a total of all the sales. pft again.

what tiny little statement am i missing out here?

9 Years
Discussion Span
Last Post by Easter Bunny

ahh yes, the group thing. found it on that mysql query browser too.

thanks. i'll go sit in the corner and wear my n00b hat.


crud, i must have edited this twice and posted replies 6 times to this thread. my opera mini is full of crap these days. maybe it's just because i'm using an ericsson?

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.