In a MySQL database To get the SUM of a column I just do:
SELECT SUM(orderamount_total) FROM io__order_infos_hext
Is it possible in only one SQL request to get the SUM of orderamount_total
of the different curriences defined in the column currency
?
Advertisement
Answer
You just need a group by
SELECT currency, SUM(orderamount_total) FROM io__order_infos_hext group by currency