select time,sum(money) from (select * from tab1,tab2)
group by time
group by time
解决方案 »
- 我下载了ODAC 11.2 Release 5,想使用Oracle Provider for OLE DB 进行数据库的连接等操作,但是不知引用那个dll文件
- 数据库定时导入
- 安装]windows平台下Oracle RAC集群系统安装过程
- 数据库开发和DBA会用到哪些工具?
- 朋友们谁知道行业中做data guard的报价(RAC环境)
- ASP.NET+oracle数据库,偶尔报ORA-03113: 通信通道的文件结尾 进程错误 [问题点数:100分]
- 无数据库客户端的连接怎么实现?
- 求教时间相减问题
- 想学Oracle不知道够不够格
- 动态复制分区表--请大神指点迷津
- 初学ORACLE,问几个很弱的问题,希望大家帮忙解答下,谢谢哈!!!
- 求一个SQL语句
TO: ropriest(馆主):左右连接我知道,但在这语句中怎么用呀?麻你帮我写一下,好嘛??
多谢!!!
(
select time,money from tb1
union
select time,money from tb2
)
group by time
(
select time,money from tb1
union all
select time,money from tb2
)
group by time
(
select time1 time,money1 money from a
union
select time2 time,money2 money from b
)
group by time
(
select time1 time,money1 money from a
union all
select time2 time,money2 money from b
)
group by time
比如表2:
time2 money2
9月 45
10月 10
就能看出二者的区别了
表3:
time money1 money2
9月 0 45
10月 10 5
11月 20 0
12月 30 0 再次多谢高手们!!!分不够可以再加!
(
select time1 time,money1, 0 money2 from a
union all
select time2 time,0 money1, money2 from b
)
group by time
from temp_1
full outer join temp_2 on (time1=time2)
order by 2;
select time, sum(..),sum(..) from ( shine333(enihs) 上面的语句,可去掉 order by .. )group by time
(
select time,money from a
union all
select time,money from b
) group by time我经常这样用