gpt4 book ai didi

Mysql 哪里等于?

转载 作者:行者123 更新时间:2023-11-29 01:05:51 25 4
gpt4 key购买 nike

我有一个mysql函数

SELECT * FROM `stats` WHERE BETWEEN '2011-01-03' AND '2011-01-01' AND `email`='sarah@sarah.com' AND `city`='New York' AND `location`='New York' AND `date` GROUP BY action

但是我似乎无法让它工作,如果我取出 BETWEEN '2011-01-03' AND '2011-01-01' 但没有它,它会工作,我怎样才能使这个功能工作?

最佳答案

WHERE BETWEEN '2011-01-03' AND '2011-01-01'

需要一个要比较的列名。它是 date 列吗?

那么你的查询应该是这样的:

SELECT *
FROM `stats`
WHERE `date` BETWEEN '2011-01-01' AND '2011-01-03'
AND `email`='sarah@sarah.com'
AND `city`='New York'
AND `location`='New York'
GROUP BY action

关于Mysql 哪里等于?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4594183/

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