[英]Rolling numbering of data in a view
I am using the following query to number the data based on parameter a and b.我正在使用以下查询根据参数 a 和 b 对数据进行编号。
count(table.a) OVER (PARTITION BY table.b, tdahw.a ORDER BY table.date) AS row_count
The output is numbering the values as incremental.输出将值编号为增量。 However, if there are 3 counts of a over partition of a and b, I want it to display 3 across all the rows.
但是,如果 a 和 b 的过度分区有 3 个计数,我希望它在所有行中显示 3 个。 What tweaks should I make to the existing thing?
我应该对现有事物进行哪些调整?
Sample data:样本数据:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.