处理分组出现sql_mode=only_full_group_by”问题
Showing
1 changed file
with
2 additions
and
2 deletions
... | @@ -31,7 +31,7 @@ | ... | @@ -31,7 +31,7 @@ |
31 | select(@i:= @i+ 1) r, | 31 | select(@i:= @i+ 1) r, |
32 | a.* | 32 | a.* |
33 | from( | 33 | from( |
34 | select openid, min(score) score, count(*) num, nickname, headimgurl | 34 | select openid, min(score) score, count(*) num, min(nickname) nickname, min(headimgurl) nickname |
35 | from t_kmr_score_log_info | 35 | from t_kmr_score_log_info |
36 | where status= 1 | 36 | where status= 1 |
37 | GROUP BY openid) a, | 37 | GROUP BY openid) a, |
... | @@ -46,7 +46,7 @@ | ... | @@ -46,7 +46,7 @@ |
46 | from( | 46 | from( |
47 | select(@i:= @i+ 1) r, a.* | 47 | select(@i:= @i+ 1) r, a.* |
48 | from( | 48 | from( |
49 | select openid, min(score) score, count(*) num, nickname, headimgurl | 49 | select openid, min(score) score, count(*) num, min(nickname) nickname, min(headimgurl) nickname |
50 | from t_kmr_score_log_info | 50 | from t_kmr_score_log_info |
51 | where status= 1 | 51 | where status= 1 |
52 | GROUP BY openid) a,( | 52 | GROUP BY openid) a,( | ... | ... |
-
Please register or sign in to post a comment