mysql - SQL transactions sum for each year -


this question has answer here:

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

Popular posts from this blog

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -