当前位置:网站首页>Database to query the quantity of books lent in this month. If it is higher than 10, it will display "more than 10 books lent in this month". Otherwise, it will display "less than 10 books lent in thi
Database to query the quantity of books lent in this month. If it is higher than 10, it will display "more than 10 books lent in this month". Otherwise, it will display "less than 10 books lent in thi
2022-06-24 08:48:00 【CSDN Q & A】
database ,MySQL, The book management system
problem : Query the quantity of books lent this month , If it is higher than 10 Ben Shi , Show “ The number of books lent this month is greater than 10 Ben ”, Otherwise, it will show “ Books lent this month are less than 10 Ben ”.
My code can already query the number of books lent this month ,
But the following display is greater than or less than 10 This statement will not write .
select b_id,sum(borrow.number) from borrow where month(bodate)=month(now()) group by b_id;Thank you for your answer .
remarks :
borrow: Table name
b_id: Book number
number: Number of books lent
bodate: Borrowing date
边栏推荐
- 【力扣10天SQL入门】Day3
- 数据平台简介
- MySQL | 存储《康师傅MySQL从入门到高级》笔记
- [life thinking] planning and self-discipline
- 一文详解|增长那些事儿
- Using skills of xargs -- the way to build a dream
- PHP code encryption + extended decryption practice
- Get screen width and height tool class
- js中通过key查找和更新对象中指定值的方法
- 解析互联网广告术语 CPM、CPC、CPA、CPS、CPL、CPR 是什么意思
猜你喜欢

every()、map()、forEarch()方法。数组里面有对象的情况

一文详解|增长那些事儿

MySQL 因字符集问题插入中文数据时提示代码 :1366

K8S部署高可用postgresql集群 —— 筑梦之路

疫情、失业,2022,我们高喊着摆烂和躺平!

中国芯片独角兽公司

Background management of uniapp hot update

数据中台:数据中台技术架构详解

liunx服务器 telnet 带用户名 端口登陆方法

It is enough to read this article about ETL. Three minutes will let you understand what ETL is
随机推荐
One development skill a day: how to establish P2P communication based on webrtc?
定时备份数据库脚本
GradScaler MaxClipGradScaler
MySQL | 视图《康师傅MySQL从入门到高级》笔记
mysql写的代码数据 增删查改等等
[force deduction 10 days SQL introduction] Day3
基于单片机开发的酒精浓度测试仪方案
数组相向指针系列
Shell basic operator -- arithmetic operator
利用sonar做代码检查
Get screen width and height tool class
Why do you want to file? What are the advantages and disadvantages of website filing?
获取屏幕宽高工具类
mysql组合索引的有序性
2022春招面试总结
基于QingCloud的地理信息企业研发云解决方案
Earthly 容器镜像构建工具 —— 筑梦之路
2022.06.23(LC_144,94,145_二叉树的前序、中序、后序遍历)
Xtrabackup for data backup
Lombok use