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

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

就比如在后面多一列环比列这样,是不是要用循环来做呢,求请教~~
边栏推荐
- Redis learning notes - slow query analysis
- Multithreaded exercises
- Servlet-02 lifecycle
- UEFI source code learning 3.7 - norflashdxe
- 云原生数据库-Amazon RDS
- UEFI源码学习3.7 - NorFlashDxe
- NiO example
- J. Med. Chem. | Release: a new drug design model for deep learning based on target structure
- Copilot免费时代结束!正式版67元/月,学生党和热门开源项目维护者可白嫖
- Navagation navigation
猜你喜欢
随机推荐
Navagation navigation
Use Base64 to show pictures
高性能算力中心 — InfiniBand — Overview
【CTF】bjdctf_ 2020_ babyrop
Redis learning notes - geographic information location (GEO)
Redis learning notes - data type: hash
[geek Challenge 2019] hardsql
High performance computing center RDMA implementation technology
Go string comparison
多线程习题
Embedded system overview (learning notes)
Basic use of lua
什么是BFC?BFC可以解决什么问题
UEFI 学习3.6 - ARM QEMU上的ACPI表
2022 Gdevops全球敏捷运维峰会-广州站精华回放(附ppt下载)
AI: the Elephant in Room
Servlet-02 lifecycle
Wechat applet: click the button to switch frequently, overlap the custom markers, but the value does not change
Qiming Xingchen Huadian big data quantum security innovation laboratory was unveiled and two black technology products were released
Thin film interference data processing



![[极客大挑战 2019]HardSQL](/img/73/ebfb410296b8e950c9ac0cf00adc17.png)



![[CISCN2019 华北赛区 Day2 Web1]Hack World](/img/bf/51a24fd2f9f0e13dcd821b327b5a00.png)