我有两个桌子
组
gid| account | head
---------------------------------
1 | first cash | CashinHand
2 | second cash | CashinHand
3 | third cash | CashinHand
4 | office expense | Expense
trans
tid| particular | amount
------------------------------
1 | first cash | 100
2 | office expense | 300
3 | second cash | 130
4 | third cash | 50
5 | first cash | 110
6 | office expense | 750
//我想获取“报告所有现金”。这取决于组表的标题CashinHand
像这样
tid| particular | amount
------------------------------
1 | first cash | 100
3 | second cash | 130
4 | third cash | 50
5 | first cash | 110