当前位置:网站首页>After SQL grouping, get the whole record of the row with the maximum or minimum value of one of the fields
After SQL grouping, get the whole record of the row with the maximum or minimum value of one of the fields
2022-07-20 07:51:00 【Happiness and simplicity 2020】
---sql After grouping, get the whole record of the row with the maximum or minimum value of one of the fields ----
select * from
(
select ROW_NUMBER() over (partition by ProjectID order by RecordingTime desc) RowID,
ISNULL(TotalNumber,0)TotalNumber,RecordingTime,ProjectID from dbo.AccidentData
where Isvalid=1
and TotalNumber>0
and exists(select 1 from dbo.fnSplit('75,84,20,45,15,46,55,42,41,52,59,57,82,83,16,62,87,86,58',',')P
where ProjectID in (P.col))
) A where A.RowID=1
边栏推荐
- Unable to detect release version problem solving
- Summer sun + high bank and deep valley, here comes the latest mobile wallpaper of share creators
- 读取douban_data.csv文件写入redis
- Tkinter模块GUI图形化编程实战(八)——中国象棋(含超详解及完整源码、完整程序免费下载链接)
- 基于hough的图像分割-matlab
- 嵌入式研发行业对于源代码保密该怎么做
- Network security module B of national vocational college skills competition Wireshark data analysis and forensics information pacapng
- Mecol Studio - Huawei 14 day Hongmeng equipment development practical notes 3
- Flask框架——模型关系(多对多)
- 回归——逻辑回归
猜你喜欢
使用Flutter开发App的一种组合思路(小程序+App)
Problems encountered in execve execution - resolved
Why is the IT industry still the first choice for so many people?
梅科尔工作室-华为14天鸿蒙设备开发实战笔记二
Meta CTO: Cambria will be equipped with handle for the first time, and the new product will last for 12-24 months
夏日艳阳+高岸深谷,Share Creators最新手机壁纸来了
This week's big news | Elbit pushes the exclusive ar helmet for pilots, and Apple's second generation Mr will be divided into high and low configurations
为什么IT行业还是那么多人的首选?
After bookkeeping, export the accounts of this month to generate tables
Watch for free: video courses on technology application based on Remote Sensing (deep learning, gee, hyperspectral, long time series, UAV, etc.)
随机推荐
Flask框架——模型关系(1对多)
UnityVR--机械臂场景2-机械臂
[daily question] 749 Isolate virus
static 关键字......
什么是服务器SSL证书 是SSL加密证书还是代码签名证书
Proxy mode (proxy)
C# 基础(二)
YOLOV7:AttributeError: module ‘distutils‘ has no attribute ‘version‘ 的解决方案
Openstack Stein deployment
【C语言】动态内存管理
如何区分固态硬盘和机械硬盘
突然发现一款优化神器
免费观看:基于遥感领域的(深度学习、GEE、高光谱、长时间序列、无人机等)技术应用视频课程
Hough based image segmentation matlab
回归——逻辑回归
Custom types - Enumeration and union
Applet container technology is added to the mixed app development queue, and the cross end development efficiency is improved by 100%
函数柯里化---实现Function.prototype.bind
C# 基础 (一)
Bootloader learning notes - Part 2