Teka-teki

| | Comments (2)

Dengan hanya menggunakan statement SQL standar (subselect boleh), bagaimana cara mengubah

tabel ini:
sk8er                                  result
-----------                          -------------
  s  |    t                               s  | r
------------                         ------------
1   |    9                               1  | 5
2   |    6                               2  | 1
3   |    7         menjadi               3  | 2
4   |    8                               4  | 4
5   |    7                               5  | 2
-----------                           ------------
t = time
r = rank
(perhatikan rank 3 tidak ada, karena yg 2 dobel)

Cute riddle :)

Categories

2 Comments

enils said:

ummm......... *buka contekan*

masi gag bisaa :D

U'd 1st said:

select s,(select 1+count(*) form sk8ter as s where s.t< x.t) from sk8ter as x;

Leave a comment

About this Entry

This page contains a single entry by Yohanes Nugroho published on October 25, 2003 4:43 PM.

Beautiful Life was the previous entry in this blog.

Mau jadi manusia is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 4.0