易截截图软件、单文件、免安装、纯绿色、仅160KB

ORACLE Top/Bottom N、First/Last、NTile

目录
==================================================================
1.带空值的排列
2.Top/Bottom N查询
3.First/Last排名查询
4.按层次查询
一、带空值的排列:
假如被排列的数据中含有空值呢?
SQL> select region_id, customer_id,
   2         sum(customer_sales) cust_sales,
   3         sum(sum(customer_sales)) over(partition by region_id) ran_total,
   4         rank() over(partition by region_id
   5                  order by sum(customer_sales) desc) rank
   6    from user_order
   7   group by region_id, customer_id;
REGION_ID CUSTOMER_ID CUST_SALES RAN_TOTAL       RANK
---------- ----------- ---------- ---------- ----------
         10          31               6238901          1
         10          26    1808949    6238901          2
         10          27    1322747    6238901          3
         10          30    1216858    6238901          4
         10          28 


相关文档:

oracle 表空间操作

oracle表空间操作详解
  1
  2
  3作者:   来源:    更新日期:2006-01-04 
  5
  6 
  7建立表空间
  8
  9CREATE TABLESPACE data01
 10DATAFILE '/ora ......

Oracle 1Z0

大家好,我在http://download.csdn.net/source/836323上发的帖子,确实只是个demo,其题库内容见下文,此为最新题库的一部分,正式版题库是175题。需要正式版本的朋友,可以直接联系我或者到www.certinside.cn/1z0-051  上面看看,我们和testinside是一家的,需要的话我可以给你打个折,价格再议。我的QQ:390970748  ......

小布老师oracle视频讲座笔记(二)

Oracle Process Structure
Oracle takes advantage of various types of processes:
 —User process: Started at the time a database user requests connection to the Oracle server
  —Server process: Connects to the Oracle instance and is started when a user establishes a session
& ......

Oracle日期函数:

 select sysdate from dual; 从伪表查系统时间,以默认格式输出。
sysdate+(5/24/60/60) 在系统时间基础上延迟5秒
sysdate+5/24/60 在系统时间基础上延迟5分钟
sysdate+5/24 在系统时间基础上延迟5小时
sysdate+5 在系统时间基础上延迟5天
所以日期计算默认单位是天
round (sysdate,’day’) 不是四除 ......

ORACLE Rank, Dense_rank, row_number

目录
======================================================
1.使用rownum为记录排名
2.使用分析函数来为记录排名
3.使用分析函数为记录进行分组排名
一、使用rownum为记录排名:
【1】测试环境:
SQL> desc user_order;
Name              ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号