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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -