gpt4 book ai didi

mysql - sql select语句,正确select语句指南

转载 作者:行者123 更新时间:2023-11-30 00:31:17 25 4
gpt4 key购买 nike

我应该编写一个 SQL 查询,该查询将选择所有当前已借出且过期应归还的书籍,这些书籍在图书馆系统中的值(value)大于 10.00 美元。我应该返回借书人的姓名、地址、邮政编码和电话号码、负责交易的图书管理员的姓名和电话号码、归还图书的日期以及姓名、费用和 ISBN 号码这本书的。我的查询应该按返回日期按降序对列表进行排序。

这是我写的

Select a.returndate as booklended ,a.isbn_number as booklended, b. as borrower,          
b.address as borrower, b.postalcode as borrower, b. phonenumber as
borrower, c.name as librarian, c.phonenumber as librarian
from booklended.a, librarian.c, borrower.b
where a. librarian id= c.librarianid
and a.librarycard = b.librarycard
and returndate < curdate()
and cost > 10.00
order by a. returndate desc;

但是我收到此错误 5:无效的模式名称:语句中的 BOOKLENDED [选择 a.returndate 作为 booklending ,a.isbn_number 作为 booklending,b。作为借款人,b. 作为借款人的地址,b. 作为借款人的邮政编码,b。电话号码作为借阅人,c.name 作为图书管理员,c.phonenumber 作为图书管理员

来自 booklending.a]

我能否获得有关如何纠正此问题的指南。谢谢

最佳答案

试试这个:

Select a.returndate as booklended ,a.isbn_number as booklended,     
b.address as borrower, b.postalcode as borrower, b.phonenumber as
borrower, c.name as librarian, c.phonenumber as librarian
from booklended a, librarian c, borrower b
where a. librarian id= c.librarianid
and a.librarycard = b.librarycard
and returndate < curdate()
and cost > 10.00
order by a.returndate desc;

关于mysql - sql select语句,正确select语句指南,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22500567/

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