1
我有一個帶有示例外匯的表格,其中包含一分鐘的小節引號。如何選擇行的第一個和最後一個值,並在5分鐘間隔之間
id,quote_name,quote_date,quote_time,open_rate,close_rate,high_rate,low_rate
"1417","EURUSD","2015-01-01","13:01:00","1.2096","1.2096","1.2097","1.2096"
"1418","EURUSD","2015-01-01","13:02:00","1.2097","1.2096","1.2097","1.2096"
"1419","EURUSD","2015-01-01","13:04:00","1.2096","1.2098","1.2101","1.2096"
"1420","EURUSD","2015-01-01","13:05:00","1.2099","1.2099","1.2099","1.2099"
是否有可能創建SELECT語句,這將是返回5分鐘間隔報價。我的意思是它應該在每5分鐘的時間間隔內選擇5行,並返回第一行的open_rate,最後一行的close_rate以及high_rate和low_rate的最小值和最大值。 有沒有可能?怎麼做。
我所知道的是如何選擇兩個日期之間的最小值和最大值。
它工作的很好,非常感謝! – WIESIEK