Hello,
Self taught guy here. Thanks for reading my post.
I've made a app to track the sales of floating rubber ducks for a duck race.
I have a database which contains data similar to this:
id soldby package
------------------------
1 John 6
2 John 25
3 John 1
4 John 6
5 John 25
6 John 1
7 Tammy 6
8 Tammy 25
9 Tammy 1
10 Tammy 1
11 Tammy 6
12 Tammy 25
13 Tammy 25
The number in the package field refers to the number of ducks purchased. Each package 1,6 and 25 has a dollar amount $5, $25 and $100. I need to output data for each sales person containing total number of ducks sold and the full dollar amount. I'd like the output to be similar to this format:
Sales Person Total Ducks Sold Total Dollars
John 64 260
Tammy 58 360
Please offer help on how to query the db to unify all the numbers with the correlating name so I arrive at something similar the the above. I'm not sure where to start as I've never had this challenge before.