select max(b.areaName) as 地区,
(select count(*) from xls where areaParentCode=a.areaParentCode and [年] = '2006年' and rtrim(ltrim(专利类型))='发明') as '2006年' ,
(select count(*) from xls where areaParentCode=a.areaParentCode and [年] = '2007年' and rtrim(ltrim(专利类型))='发明') as '2007年'
from xls a,dic_postalCode b where a.areaParentCode=b.postalID and b.postalparentID='0' group by a.areaParentCode这是查询语句,需要在第3列 输出2年数据的增幅 ,第4列输出2年的差值
请问怎么办
------------------------
例子如 (数1-数2)
数1 数2 增长率 增幅
210 113 85.8 97
183 127 44.1 56急~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(select count(*) from xls where areaParentCode=a.areaParentCode and [年] = '2006年' and rtrim(ltrim(专利类型))='发明') as '2006年' ,
(select count(*) from xls where areaParentCode=a.areaParentCode and [年] = '2007年' and rtrim(ltrim(专利类型))='发明') as '2007年'
from xls a,dic_postalCode b where a.areaParentCode=b.postalID and b.postalparentID='0' group by a.areaParentCode这是查询语句,需要在第3列 输出2年数据的增幅 ,第4列输出2年的差值
请问怎么办
------------------------
例子如 (数1-数2)
数1 数2 增长率 增幅
210 113 85.8 97
183 127 44.1 56急~~~~~~~~~~~~~~~~~~~~~~~~~~~~
解决方案 »
- 登录页面与数据库连不上
- mztreeview 2.0 节点图标的问题
- 【救命啊救命啊····】ASP.NET+MYSQL开发乱码问题
- 谁有好的asp.net2.0的分页程序啊~ 可以发我一份不
- 请教高手:如何在asp.net中实现日期循环?
- 做查询,用datagrid显示的问题`在线等即送分
- 框架中打开新的页面
- 根据什么来配置web.config中连接池容量的大小,连接池的大小对应用程序的性能有何影响?
- 如何检测一个文件是否文本文件?
- 如果页面功能执行的时间会比较长,怎么办?谢谢
- 程序报错,说我自定义的类不支持viewstate序列号,请问怎么解决.
- 问个Viewstate的问题(孟老师和高手们)
from
(
select max(b.areaName) as 地区,
(select count(*) from xls where areaParentCode=a.areaParentCode and [年] = '2006年' and rtrim(ltrim(专利类型))='发明') as '2006年' ,
(select count(*) from xls where areaParentCode=a.areaParentCode and [年] = '2007年' and rtrim(ltrim(专利类型))='发明') as '2007年'
from xls a,dic_postalCode b where a.areaParentCode=b.postalID and b.postalparentID='0' group by a.areaParentCode
) A