高维数据的统计挑战 Modern applications of statistical theory and methods can involve extremely large data-sets, often with huge numbers of measurements on each of a comparatively small number of experimental units. New methodology and accompanying theory hav
有些事情始终是需要坚持下去的。。。
今天复习一下之前用到的连续相同数据的统计。
首先,创建一个简单的测试表,这里过程就略过了,直接上表(真的是以简单为主,哈哈…)
第一种写法row_number():
SELECT val,COUNT(*) FROM
(SELECT ID,val,
row_number() OVER(ORDER BY ID)-row_number() OVER(PARTITION BY val ORDER BY ID) x
FROM LCY ) GROUP BY val,x