gpt4 book ai didi

mysql使用函数从多个表中选择

转载 作者:行者123 更新时间:2023-11-29 18:46:15 24 4
gpt4 key购买 nike

此查询有什么问题

select reports.SUM( time1 ),
reports.created_by,
reports.id,
users.wage,
users.title
from reports,
users
where users.title = reports.created_by
and reports.created_date >= '1396/03/01'
and reports.created_date <= '1396/03/30'
GROUP BY created_by
ORDER BY created_by

1630 - 函数报告。SUM 不存在。查看引用手册中的“函数名解析和解析”部分

最佳答案

应该是...

select SUM(reports.time1),
reports.created_by,
reports.id,
users.wage,
users.title
from reports,
users
where users.title = reports.created_by
and reports.created_date >= '1396/03/01'
and reports.created_date <= '1396/03/30'
GROUP BY created_by
ORDER BY created_by

关于mysql使用函数从多个表中选择,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44623978/

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