Gold Inflow / Outflow

The trends of gold economy within a game

Description

The trends of gold economy within a game.

Sample Input

add_point
time user_id value
1416435585 2 300
1416435586 3 500
1416435587 5 1000
1416435588 1 100
... ...
consume_point
time user_id value
1416435585 2 100
1416435586 3 900
1416435587 5 3000
1416435588 1 400
... ...

Query


to view this query

Sample Output

day sum_in sum_out
2014-10-01 3010 2010
2014-10-02 2030 4200
2014-10-03 1000 10200
2014-10-04 3000 13200
2014-10-05 10030 13200
2014-10-06 3500 6200
2014-10-07 4400 7200
2014-10-08 670 8200
... ... ...