当前位置: 动力学知识库 > 问答 > 编程问答 >

database - Window functions vs vanilla SQL

问题描述:

If we would consider window functions as an extension to vanilla SQL, what is their advantage over it?

Can you perform queries and things that wouldn't be possible with 'plain' SQL?

网友答案:

The simple answer is "yes", you can do things that wouldn't be possible otherwise -- at least not in a single query.

A simple example is row_number(), which you cannot replicate (in a single select) on a table that has no unique keys.

分享给朋友:
您可能感兴趣的文章:
随机阅读: