求如下问题的sql语句
1 如何把一个字段的字符串连起来? 不能用游标
比如
ID Content
1 'boy'
2 'girl'
3 'cat'
想得到结果 'boygirlcat'
3
有一表
Month line Amont
1 'A' 100
1 'A' 300
1 'c' 100
2 'd' 200
2 'A' 200
如何得到结果
Month line Amount percentage1 percentage2
1 'A' 400 0.8 0.4
1 'c' 300 0.2 0.1
2 'A' 200 0.5 0.25
2 'd' 200 0.5 0.25
Amount容易得到,但percentage1 和 percentage2如何在不能用临时表的情况下完成?