Now there is a table, only focus on one of the coil (30), record the time (hours and minutes on, interval for 5 minutes), flow fields, three in the first column of the chart, the second column, the second column,
Now I want to make the query results according to the below order, transverse for daily 288 for five minutes, the vertical axis for different coil, which is 288 x 30 on a table, query the how to write the results to what I want form form?
CodePudding user response:
By the way, form elements are flow
CodePudding user response:
- probably like this The select fstr_loopgroupid, trunc (ftd_time), The sum (case to_char (ftd_time, 'hh24mi' between '0000' and '0004' then fint_volumn else 0 end) C1, The sum (case to_char (ftd_time, 'hh24mi' between '0005' and '0009' end then fint_volumn else 0 C2, . The sum (case to_char (ftd_time, 'hh24mi' between '2355' and '2359' then fint_volumn else 0 end) C288,
The from t Group by fstr_loopgroupid trunc (ftd_time)