回答編集履歴

3

追加

2016/10/10 15:55

投稿

A.Ichi
A.Ichi

スコア4070

test CHANGED
@@ -17,3 +17,19 @@
17
17
  テーブル定義
18
18
 
19
19
  create table tableA (dateA date, fromA text, toA text);
20
+
21
+
22
+
23
+
24
+
25
+ ちょと強引ですが、作ってみました。
26
+
27
+ ```sql
28
+
29
+ create table tableAA (number int,dateA date, fromA text, toA text);
30
+
31
+
32
+
33
+ insert into tableAA SELECT dense_rank() OVER (ORDER BY dateA,toA ASC) + max, t1.* FROM tableA t1, (select max(number) max from tableAA) t2 ORDER BY fromA DESC;
34
+
35
+ ```

2

更新

2016/10/10 15:55

投稿

A.Ichi
A.Ichi

スコア4070

test CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  FROM tableA
10
10
 
11
- ORDER BY dateA, toA ASC
11
+ ORDER BY dateA, toA ASC, fromA DESC;
12
12
 
13
13
  ```
14
14
 

1

変更

2016/10/08 14:19

投稿

A.Ichi
A.Ichi

スコア4070

test CHANGED
@@ -11,3 +11,9 @@
11
11
  ORDER BY dateA, toA ASC
12
12
 
13
13
  ```
14
+
15
+
16
+
17
+ テーブル定義
18
+
19
+ create table tableA (dateA date, fromA text, toA text);