当前位置:网站首页>sql编写问题,求出当月和上月的环比值
sql编写问题,求出当月和上月的环比值
2022-06-23 09:40:00 【CSDN问答】
请问下,我想把每个月的销量和上个月做环比计算,循环出来的话要怎么写这个sql语句呢?

现在是只有两个月的,但是后面会有7月的,8月的,我想循环计算出类似于8月比7月环比多了多少这样,

就比如在后面多一列环比列这样,是不是要用循环来做呢,求请教~~
边栏推荐
- [GYCTF2020]Blacklist
- 漫画 | Code Review快把我逼疯了!
- 【CTF】bjdctf_2020_babyrop
- 【CTF】bjdctf_ 2020_ babyrop
- Go language JSON processing
- 高性能算力中心 — RDMA — 实现技术
- Getting started with cookies and sessions
- Gstore weekly gstore source code analysis (IV): black and white list configuration analysis of security mechanism
- UCOSII (learning notes)
- Redis learning notes - transactions
猜你喜欢

Gorm advanced query

2022 gdevops global agile operation and maintenance summit - essence playback of Guangzhou station (with PPT download)

给RepVGG填坑?其实是RepVGG2的RepOptimizer开源
![[极客大挑战 2019]HardSQL](/img/73/ebfb410296b8e950c9ac0cf00adc17.png)
[极客大挑战 2019]HardSQL

Cesium加载正射影像方案

Redis learning notes RDB of persistence mechanism

Go language JSON processing

Go 单元测试

CVPR大会现场纪念孙剑博士,最佳学生论文授予同济阿里,李飞飞获黄煦涛纪念奖...
Redis learning notes - data type: string (string)
随机推荐
ICLR 2022 | 视频中的动态卷积TAdaConv以及高效的卷积视频理解模型TAdaConvNeXt
Web -- Information Disclosure
高性能算力中心 — RDMA — 实现技术
Difference between global shutter and roller shutter
2022 gdevops global agile operation and maintenance summit - essence playback of Guangzhou station (with PPT download)
我被提拔了,怎么和原来平级的同事相处?
Redis learning notes - data type: Set
Redis learning notes - client communication protocol resp
有没有人,计划开源一套工业级“秒杀”系统架构?
[極客大挑戰 2019]HardSQL
[wangdingbei 2020 Qinglong formation]areuserialz
什么是闭包函数
Go language JSON processing
Redis learning notes - data type: ordered set (Zset)
Notes on using the coding code base
Go语言JSON 处理
J. Med. Chem. | RELATION: 一种基于靶标结构的深度学习全新药物设计模型
Gstore weekly gstore source code analysis (IV): black and white list configuration analysis of security mechanism
Jog sport mode
漫画 | Code Review快把我逼疯了!