uj5u.com熱心網友回復:
這出題人確實欠打,話都沒說完。count(1) over(partition by content range between current row and 1 / 86400 * 60 * 30 following) "Cnt" (盲寫不保證對)
uj5u.com熱心網友回復:
看不懂看不懂題uj5u.com熱心網友回復:
with t1 as(select to_date('2020-01-01 11:00', 'yyyy-mm-dd hh:mi') time, 'Linux' content
from dual
union all
select to_date('2020-01-01 11:10', 'yyyy-mm-dd hh:mi'), 'Oracle'
from dual
union all
select to_date('2020-01-01 11:20', 'yyyy-mm-dd hh:mi'), 'Linux'
from dual)
select time, content, count(content) over(partition by content order by time range between 0 preceding and 30 / 60 / 24 following) from t1;
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/8475.html
標籤:開發
