回答編集履歴
2
桁を揃えた
test
CHANGED
@@ -32,9 +32,11 @@
|
|
32
32
|
|
33
33
|
), SUB2 AS (
|
34
34
|
|
35
|
-
SELECT *
|
35
|
+
SELECT *
|
36
36
|
|
37
|
-
, CASE WHEN (machine, error_code) <> (LAG_machine, LAG_error_code)
|
37
|
+
, CASE WHEN (machine, error_code) <> (LAG_machine, LAG_error_code)
|
38
|
+
|
39
|
+
THEN 1 ELSE 0 END AS FLG
|
38
40
|
|
39
41
|
, SUM(CASE WHEN (machine, error_code) <> (LAG_machine, LAG_error_code)
|
40
42
|
|
1
リンクを作成
test
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
|
13
13
|
|
14
14
|
|
15
|
-
https://www.db-fiddle.com/f/oPHaxqhi65azrJAUzetRGT/0
|
15
|
+
[https://www.db-fiddle.com/f/oPHaxqhi65azrJAUzetRGT/0](https://www.db-fiddle.com/f/oPHaxqhi65azrJAUzetRGT/0)
|
16
16
|
|
17
17
|
|
18
18
|
|