我可以通过这种方式找到经验分布
select command_type, duration, round(percentage, 2)
from (select distinct command_type,duration_sec,
percent_rank() over(partition by command_type order by duration) percentage
from command_durations
order by 1, 2)
问题是如何使用 oracle 模型子句来做同样的事情。我从这个开始
select command_type,duration,dur_count from command_durations
model UNIQUE SINGLE REFERENCE
partition by (command_type)
dimension by ( duration)
measures(0 dur_count)
rules(
dur_count[duration]=count(1)[cv(duration)]
)
order by command_type,duration
但现在我需要区分记录,以便能够继续寻找经验分布。
如何在模型子句中区分记录?