回答編集履歴

1

追記

2020/12/24 07:37

投稿

sazi
sazi

スコア25327

test CHANGED
@@ -75,3 +75,29 @@
75
75
  GROUP BY A._id
76
76
 
77
77
  ```
78
+
79
+ 日付毎に出力したいという事なら、そもそもgroup byの指定が正しくありません。
80
+
81
+ ```SQL
82
+
83
+ SELECT dt , count(*) as cnt
84
+
85
+ FROM A.Atable
86
+
87
+ WHERE corpid = 1
88
+
89
+ AND (
90
+
91
+ (dt >= 20201224 AND dt <= 20201224)
92
+
93
+ OR (dt >= 20201225 AND dt <= 20201225)
94
+
95
+ )
96
+
97
+ AND "$word" LIKE '%id.%'
98
+
99
+ AND _index is NOT NULL
100
+
101
+ GROUP BY dt
102
+
103
+ ```