gpt4 book ai didi

mysql 计数不同的语法

转载 作者:行者123 更新时间:2023-11-29 05:21:34 26 4
gpt4 key购买 nike

<分区>

我正在尝试提取一个与 MySQL 中的表不同的简单计数。查询如下:

select COUNT (DISTINCT column1) as distinctVol
from table1

我得到的错误如下:

Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DISTINCT call_reference) as distinctVol from dlr_calls_hist' at line 1 (State:37000, Native Code: 428)

我已经尝试过各种不同的方法,但我可以根据建议再试一次,以确保它与拼写错误无关。

我还试用了一个在线 SS 到 MySQL 转换器(我习惯使用 SQL Server),它只是吐出相同的语法。

是的,我可能会输出数据并将其导入 SQL Server,这是我努力的最终目标,但首先我需要创建数据集,因为 MySQL 中的整个数据库太大,有很多不必要的信息 - 尽量减少资源浪费。

欢迎所有想法,并感谢您在 advanZe 中!

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