且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

MySQL查询中的GROUP BY子句仅在某些情况下会使我的连接崩溃

更新时间:2023-09-16 16:08:10

GROUP BY来自表psh.它应该是驱动表,并与非分组表联接:

The GROUP BY is from table psh. It should be the driving table and join with the non group by table:

select count(ps.ID) 
FROM player_state_history as psh
JOIN player_spin as ps ON
  psh.playerId = ps.playerId
WHERE psh.sceneId IN (9, 19, 29, 30)
GROUP BY psh.sceneId

如果在psh.sceneId