contoh2 Oracle TSQL

2008 October 13 at 9:02 am 1 comment

SELECT salary, DENSE_RANK() OVER (ORDER BY salary) as drank FROM Xtest

SALARY      DRANK
———- ———-
210          1
250          2
300          3
310          4
330          5
350          6
350          6

7 rows selected.

SELECT salary,salary-25 “dari”, salary+25 “sampai”,
COUNT(*) OVER (ORDER BY salary RANGE BETWEEN 25 PRECEDING
AND 25 FOLLOWING) AS mov_count FROM Xtest;

SALARY       dari     sampai  MOV_COUNT
———- ———- ———- ———-
210        185        235          1
250        225        275          1
300        275        325          2
310        285        335          3
330        305        355          4
350        325        375          3
350        325        375          3

Entry filed under: Oracle. Tags: .

tata cara sholat Nabi Nasionalisme TKI di Dubai

1 Comment Add your own

  • 1. yogi  |  2008 October 21 at 10:00 am

    kang judulnya salah tuh mustinya “contoh2 Oracle PLSQL” bukan TSQL🙂 ntar oracle marah loh disamain ama MSSQL🙂

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


Categories


%d bloggers like this: