Floor (To_char (StartTime, ' mi ')/15) *15 order by Statime ";
String sql = "Select To_char (StartTime, ' yyyy ') | | ' -' | | To_char (StartTime, ' mm ') | | ' -' | | ' + ' to_char (StartTime, ' dd ') | | ' ' | | To_char (StartTime, ' hh24 ') | | ': ' | | "+ " floor (To_char (StartTime, ' mi ')/15) *15 statime, sum (Count) as Counts "+ " from table "+ " where StartTime <= to_date (' 2016-11-29 18:00:00 ', ' yyyy-mm-dd hh24:mi:ss ') ' + ' GROUP by To_char (StartTime, ' YYYY ') | | ' -' | | "+ " To_char (StartTime, ' mm ') | | ' -' | | To_char (StartTime, ' dd ') | | ' ' | | "+ " To_char (StartTime, ' hh24 ') | | ': ' | | floor (TO_CHAR (StartTime, ' mi ')/15) *15 order by Statime ";
As on the SQL statement
StartTime is one of the time fields
Count is a summarized field, or count (*) counts the number of records
Table is the name of the sheet, replace it yourself
You can also change 15 to 30, 60, and so on. Number of minutes required for statistics summary
Oracle statistics for 15 minutes per time period