MySQL - Transform simple table -


It sounds easy, but I think there may be several steps to get this. Is there any easy way to do this?

Enter image details here

< Div class = "post-text" itemprop = "text">

You are looking for aggregation tasks, in particular, group_concat () . The key is that you want to do two aggregations:

  select subgroup combo, number as number (*), sum (expense) as the total amount, amount in the form of total transaction (Transaction) as customer (group of subgroups) subgroupcombo, amount as expense (expenditure), amount (transactions) by customer as input i group) group group by subgroupcombo ;    

Comments

Popular posts from this blog

c# - Textbox not clickable but editable -

php - how to change mysql_result($res, 0, "url"); to mysqli -

Matlab transpose a table vector -