質問編集履歴

5

誤字

2017/11/13 10:42

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -4,9 +4,9 @@
4
4
 
5
5
  SELECT receiver_id,
6
6
 
7
- COUNT( CASE WHEN is_male = 0 THEN sender_id END) AS is_mail_count,
7
+ COUNT( CASE WHEN is_male = 0 THEN sender_id END) AS is_male_count,
8
8
 
9
- COUNT( CASE WHEN is_male != 0 THEN sender_id END) AS not_mail_count
9
+ COUNT( CASE WHEN is_male != 0 THEN sender_id END) AS not_male_count
10
10
 
11
11
  FROM messages
12
12
 

4

誤字

2017/11/13 10:42

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -52,7 +52,7 @@
52
52
 
53
53
  'male_count' => $q->func()->count($male_case ),
54
54
 
55
- 'not_male_count' => $q->func()->count($staff_case)
55
+ 'not_male_count' => $q->func()->count($not_male_case )
56
56
 
57
57
  ]);
58
58
 
@@ -66,9 +66,9 @@
66
66
 
67
67
  SELECT receiver_id,
68
68
 
69
- COUNT( DISTINCT(CASE WHEN is_male = 0 THEN sender_id END)) AS is_mail_count,
69
+ COUNT( DISTINCT(CASE WHEN is_male = 0 THEN sender_id END)) AS is_male_count,
70
70
 
71
- COUNT( DISTINCT(CASE WHEN is_male != 0 THEN sender_id END)) AS not_mail_count
71
+ COUNT( DISTINCT(CASE WHEN is_male != 0 THEN sender_id END)) AS not_male_count
72
72
 
73
73
  FROM messages
74
74
 

3

誤字

2017/11/13 09:50

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -34,7 +34,7 @@
34
34
 
35
35
 
36
36
 
37
- $not_male_case = $messages_q->newExpr()
37
+ $not_male_case = $q->newExpr()
38
38
 
39
39
  ->addCase(
40
40
 

2

誤字

2017/11/13 09:48

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -18,7 +18,7 @@
18
18
 
19
19
  ```php
20
20
 
21
- $q = $Messages->find()->where(['receiver_id'=>$user_id]);
21
+ $q = $Messages->find()->group(['receiver_id']);
22
22
 
23
23
  $male_case = $q->newExpr()
24
24
 

1

誤字

2017/11/13 09:26

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -36,8 +36,6 @@
36
36
 
37
37
  $not_male_case = $messages_q->newExpr()
38
38
 
39
- ->distinct()
40
-
41
39
  ->addCase(
42
40
 
43
41
  $q->newExpr()->add(['is_male !=' =>0]),