我有一堆風險數字,每次計算數字時都會得到處理,因此每天可能會有2個或更多的風險數字。每次計算時都會存儲一個運行ID。SQL Server Top Run ID
我怎樣才能獲得11月份的最高ID的風險編號?
我嘗試此查詢:
select a.ptf_id,a.analysis_date, a.report_run_id, a.bps
from rpt.rm_Report_History a
where a.ptf_id=336
and a.criteria_Set = 'Daily'
and a.report_section_group = 'Key_Risk_Figures'
and a.rm_rcp_param_name = 'Fund'
and a.stat_class = 'standaloneVaR'
and a.analysis_date>'2016-10-28'
這給下面的輸出:
是什麼*風險號碼*更大?什麼決定了*頂部*? – GurV
最高運行ID是給定投資組合的最新風險編號,在這種情況下投資組合336 – Patrick