sql中的排序问题?
78815 2006-02-21 06:32:51 有两个表,
table1
col1 col2
1 a
2 b
3 c
4 d
...
tabel2
col1 col2
a 10
a 12
b 7
b 7
c 45
....
现在先根据table2中的分组统计(要用外连接,将table1中col2中的东西都列出来),然后根据table1中的col1排序
这怎么做啊
select table1.col2,sum(col2) from table1,table2 where table1*=table2 group by table1.col2 ????
这个后面怎么写才能排序?