当前位置:网站首页>How to get the maximum value of column two and regenerate the table when the SQL Server column one is the same
How to get the maximum value of column two and regenerate the table when the SQL Server column one is the same
2022-07-01 10:23:00 【CSDN Q & A】
I have a database in the following format :
SourceName TimeStamp Status Path1 Path2
Alarm1 20220101 1 Street1 Street1_1
Alarm1 20220102 0 Street1 Street1_1
Alarm1 20220103 1 Street1 Street1_1
Alarm2 20220101 0 Street1 Street1_1
Alarm2 20220301 1 Street1 Street1_1
Alarm3 20220301 1 Street1 Street1_1
Alarm3 20220501 1 Street1 Street1_1
The first step is to filter out the following table
SourceName TimeStamp Status
Alarm1 20220101 1
Alarm1 20220102 0
Alarm1 20220103 1
Alarm2 20220101 0
Alarm2 20220301 1
Alarm3 20220301 1
Alarm3 20220501 1
The second step , In the same case , Take the maximum value of column 2
Expected results
SourceName TimeStamp Status
Alarm1 20220103 1
Alarm2 20220301 1
Alarm3 20220501 1
Want to know how to write such a filter SQL sentence , thank you
边栏推荐
- 投稿开奖丨轻量应用服务器征文活动(5月)奖励公布
- This is the best flash popular science article I have ever seen!
- 678. 有效的括号字符串
- 华为HMS Core携手超图为三维GIS注入新动能
- C# 一行代码计算文件的MD5值 - CodePlus系列
- Continue to advance, and softcom power steadily promotes cloud intelligence strategy
- Centos 配置discuz 提示请检查 mysql 模块是否正确加载
- 亿学学堂帮个人开的证券账户安全吗?是不是有套路
- About widthstep of images in opencv
- Project0: Games
猜你喜欢

The programmer was beaten.

A quietly rising domestic software, low-key and powerful!

Programmers want to go to state-owned enterprises? The technology is backward and the salary is low. I can't find a job after lying flat for several years

Apple amplification! It's done so well

SQL SERVER2014删除数据库失败,报错偏移量0x0000...

CodeBlocks 左侧项目栏消失,workspace 自动保存项目,Default workspace,打开上次的workspace,工作区(图文教程,已解决)

CRC 校验

How to solve the problem of SQL?

Simulink simulation circuit model of open loop buck buck buck chopper circuit based on MATLAB

缺少比较器,运放来救场!(运放当做比较器电路记录)
随机推荐
《百年巨匠》数字藏品中奖名单公布
MySQL common commands
Is it safe to do fund fixed investment on CICC securities?
Sqlization is the first step in ETL incremental production. What are the core capabilities of such an architecture?
Which securities company has a low, safe and reliable Commission for stock trading and account opening
Button button clear border
SQLAchemy 常用操作
mysql cdc能把能把op字段拿出来吗
SQL statement modify field type "suggestions collection"
[matytype] insert MathType inter line and intra line formulas in CSDN blog
CRC verification
[MPC] ① quadratic programming problem matlab solver quadprog
12. Gateway new generation gateway
中国探月工程独家藏品限量发售!
项目必用的全局异常处理器,你学会了吗
推荐一款 JSON 可视化工具神器!
442. 数组中重复的数据
Superscalar processor design yaoyongbin Chapter 4 branch prediction -- Excerpt from subsection 4.1
Error: missing revert data in call exception
Today in history: the semiconductor war in the late 1990s; Von Neumann published the first draft; CBS acquires CNET