⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sql2.txt

📁 这个是完整的wap项目的源码 开发语言 Java 系统架构 Struts + hibernate + spring 数据库 Mysql5.0 应用服务器Tomcat5.0 开发工具 MyEc
💻 TXT
字号:
select t1.category,t1.count1,t2.count2,t3.count3
from (
	select business.category,count(information.information_id) as count1
	from business left join information
	on business.business_id=information.business_id
	and information.is_pub=1
	and information.reg_date between TO_DATE('1900-11-21','YYYY-MM-DD   HH24:MI:SS') 
	and TO_DATE('2900-11-21','YYYY-MM-DD   HH24:MI:SS')
	group by business.category
) t1,
(	select business.category,count(information.information_id) as count2
	from business left join information
	on business.business_id=information.business_id
	and information.is_pub=0
	and information.reg_date between TO_DATE('1900-11-21','YYYY-MM-DD   HH24:MI:SS') 
	and TO_DATE('2900-11-21','YYYY-MM-DD   HH24:MI:SS')
	group by business.category
) t2,
(	select business.category,decode(sum(information.pay_count),null,0,sum(information.pay_count)) as count3
	from business left join information
	on business.business_id=information.business_id
	and information.reg_date between TO_DATE('1900-11-21','YYYY-MM-DD   HH24:MI:SS') 
	and TO_DATE('2900-11-21','YYYY-MM-DD   HH24:MI:SS')
	group by business.category
) t3
where t1.category=t2.category
and t1.category=t3.category
order by category

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -