gpt4 book ai didi

php - 如何显示group by中的所有列

转载 作者:可可西里 更新时间:2023-11-01 07:32:04 24 4
gpt4 key购买 nike

我有两个表 teambobotteam,然后我尝试了这个查询:

SELECT team.id , bobotteam.teamfight/MAX(bobotteam.teamfight)
FROM team
INNER JOIN bobotteam on team.id = bobotteam.id

为什么数据只显示 1 个数据,即使我在 bobotteam 表中有两个数据。图片

Query Table image Bobotteam Table image

最佳答案

请试试这个:

SELECT team.id , bobotteam.teamfight/(select MAX(bobotteam.teamfight) from bobotteam)
FROM team
INNER JOIN bobotteam on team.id = bobotteam.id

关于php - 如何显示group by中的所有列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48557486/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com