gpt4 book ai didi

mysql - 这个特定的sql查询有什么问题?

转载 作者:太空宇宙 更新时间:2023-11-03 12:35:00 25 4
gpt4 key购买 nike

<分区>

这个sql查询有什么问题:

select a.*
from samples_order a
inner join
(
select distinct customeremail, min(id) as id
from samples_order group by customeremail
) as b
on a.customeremail = b.customeremail
and a.id = b.id where order_site="blindsuk"
and order_status = "logged" limit 50, 0
order by id desc

错误返回:您的 SQL 语法有误;检查与您的 MySQL 服务器版本对应的手册,了解在第 8 行的“order by id desc”附近使用的正确语法

select a.* 
from samples_order a
inner join (
select distinct customeremail, min(id) as id
from samples_order
group by customeremail
) as b on a.customeremail = b.customeremail and a.id = b.id
where order_site="blindsuk"
and order_status = "logged"
limit 50, 0
order by id desc

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