当前位置:网站首页>postgresql根据时间字段的大小来取数
postgresql根据时间字段的大小来取数
2022-06-22 02:07:00 【CSDN问答】
请问一下,我现在在postgresql取数据,里面涉及到一个单号,对应多条数据,每条数据有时间,我想根据时间的先后来取数,比如有这几条记录:
2021 time1 txt1
2021 time2 txt2
2021 time4 txt4
2021 time3 txt3
我现在想取出
2021 time1 time4 txt1 txt4
其中time1是最早的时间,time4是最新的时间,请问想要达到这种效果,sql语法是该咋写呢?我在网上搜了没搜到合适的
问题相关代码,请勿粘贴截图
运行结果及报错内容
之前我是取出多条数据之后,用excel的透视来取最小最大时间的数据,但是现在需求又增加了几个表,也是那些表也是同样的一条单号对应多条数据,要根据时间来取数据,这样用excel就特别费时间了。所以想咨询一下各位,谢谢
我想要达到的结果
边栏推荐
- 2020 CSP-J1 CSP-S1 第1轮 初赛 答案解析及总结、视频等
- [chapter 02 weight adaptive image denoising technology based on Morphology - full system matlab intelligent driving in-depth learning]
- atguigu----列表渲染
- [essay] the Expo that studied the RN ecology for one day yesterday is really awesome. It works well from development and construction to deployment.
- Input系统学习-----InputFilter
- 基于DPDK的高效包处理系统
- 剑指offer 26:树的子结构
- Software Test Engineer Interview interface test FAQ
- Sword finger offer 26: substructure of tree
- Preliminary competition of noip improvement group III. problem solving exercise set noip1995-noip2018
猜你喜欢

Sword finger offer 26: substructure of tree

Test APK exception control WiFi scan attacker development

An error occurs when Android uses the SQL database to login. Attempt to invoke virtual method '' on a null object reference

Games-101 personal summary transformation

微信小程序影视评论交流平台系统毕业设计毕设(8)毕业设计论文模板

Completion of graduation design of wechat small program film and television review and exchange platform system (4) opening report

Chapter 03 extraction of anterior segment tissue based on multi-scale morphology - full system matlab intelligent driving in-depth learning

微信小程序影视评论交流平台系统毕业设计毕设(3)后台功能
![[chapter 07 face QR code recognition based on principal component analysis matlab deep learning practical case]](/img/cd/65a541e8d0fc7a49ee3ef1d266790a.png)
[chapter 07 face QR code recognition based on principal component analysis matlab deep learning practical case]

Chapter 09 English printed character recognition based on feature matching matlab deep learning practical case
随机推荐
Common shortcut keys in Excel summary of shortcut keys in Excel
优秀的 Verilog/FPGA开源项目介绍(二十七)- 小型CPU
What is your understanding of interface testing?
LeetCode+ 46 - 50
GAMES-101-个人总结归纳-Rasterization
Wechat applet Film & TV Review Exchange Platform System Graduation Design (4) Rapport d'ouverture
NOIP初赛 CSP-J1 CSP-S1 第1轮 初赛 信奥中的数学知识(一)
Dachang NVIDIA face test questions sorting 123
Ansible profile
flutter系列之:flutter中的IndexedStack
【 NVIDIA development history record 618-01 】
Illumination dependent shader
digital signal processing
[chapter 07 face QR code recognition based on principal component analysis matlab deep learning practical case]
idea----bookmark
Mobile app test method
idea----复制黏贴
Atguigu---- filter
Pdf to word PDF to picture picture to PDF modifying PDF files is as convenient as operating word (Introduction to acrobat DC)
【虚幻引擎UE】打包报错出现!FindPin错误的解决办法