mysql - SQL transactions sum for each year -
this question has answer here:
- group year in date field in mysql 3 answers
i have table tranaction date , transaction price. so:
- 12/01/08 $1500
- 20/05/08 $1200
- 09/08/15 $2000
- 12/09/15 $3000
i want able find sum of transactions each year. how add them together. know how add example + example "example".
select transaction_id, transaction_date, transaction_amount transactions_table
thanks!
you'll need like:
select sum(transaction_amount), transaction_date transaction_table group year(transaction_date)
this sum transactions , group them year.
Comments
Post a Comment