惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
J
Java Code Geeks
雷峰网
雷峰网
WordPress大学
WordPress大学
宝玉的分享
宝玉的分享
云风的 BLOG
云风的 BLOG
V
Visual Studio Blog
V
Vulnerabilities – Threatpost
S
Securelist
The Hacker News
The Hacker News
The Register - Security
The Register - Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Help Net Security
Help Net Security
G
Google Developers Blog
Hugging Face - Blog
Hugging Face - Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
M
MIT News - Artificial intelligence
AI
AI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The GitHub Blog
The GitHub Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Schneier on Security
Schneier on Security
N
Netflix TechBlog - Medium
T
The Blog of Author Tim Ferriss
Google DeepMind News
Google DeepMind News
Hacker News - Newest:
Hacker News - Newest: "LLM"
H
Hacker News: Front Page
博客园 - 司徒正美
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
B
Blog
Microsoft Azure Blog
Microsoft Azure Blog
大猫的无限游戏
大猫的无限游戏
Security Latest
Security Latest
Engineering at Meta
Engineering at Meta
N
News and Events Feed by Topic
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Threat Research - Cisco Blogs
U
Unit 42
V
V2EX
V2EX - 技术
V2EX - 技术
L
LINUX DO - 最新话题
aimingoo的专栏
aimingoo的专栏
Microsoft Security Blog
Microsoft Security Blog
Recorded Future
Recorded Future
P
Privacy & Cybersecurity Law Blog
美团技术团队
小众软件
小众软件
F
Fortinet All Blogs

博客园 - 没有空气

修改win7电脑中所有文件的默认查看方式 转:Google推出免费DNS服务,首选首选8.8.8.8 备选8.8.4.4 无法在Web服务器上启动调试。您不具备调试此应用程序的权限,此项目的URL位于Internet区域 Oracle错误:"ORA-00988: 口令缺失或无效"解决 Oracle中用户用as sysdba可以登录,但normal登录不了 oracle 视图上创建触发器,发生“无法在视图上创建此类型的触发器”错误 异形孔向导用不了的解决办法(转) 给word 2003打补丁以适应2007文档格式 C#编程生成的Word2007版本的文件如何兼容Word2003?(通过代码将docx文件转存为doc文件) 原:Oracle 和 SqlServer下获取主外键表名字段名约束名的语句 sqlserver与oracle case when else ,isnull语法差别 DDL、DML、DCL Hashtable 使用GetEnumerator() 时发生 System.InvalidOperationException类型错误 npkcrypt 服务启动失败导致 Oracle11g TNSListener服务开机自动启动不了 WORD"对话框打开时命令无法执行"的解决方法 Nero刻录时报"QueryDosDevice Failed"错误 关于cidaemon.exe进程CUP占用率高的解决办法 取Excel表的字段名字 "找不到可安装的 ISAM” 和"创建文件流失败"
求每个分组里面的最大值对应的记录的sql语句
没有空气 · 2007-09-26 · via 博客园 - 没有空气

写法一:
select   *   from     [table1]   a   ,   (   select  key1,key2,key3,key4,key5,max(发生时间) as 发生时间 from table1 group by key1,key2,key3,key4,key5)   b     where   a.发生时间=b.发生时间   and   a.key1=b.key1 and a.key2=b.key2 and a.key3=b.key4 and a.key5=b.key5

写法二:

select   *   from     [table1]   a   where key1+key2+key3+key4+key5+convert(char(20),发生时间)  in    select  key1+key2+key3+key4+key5+convert(chart(20),max(发生时间))  from table1 group by key1,key2,key3,key4,key5