select
to_char((to_date(‘2019-07-01’, ‘yyyy-mm-dd’) + numtodsinterval(avg(begin_time_second), ‘second’)),’hh24:mi:ss’) avg_begin_time,
to_char((to_date(‘2019-07-01’, ‘yyyy-mm-dd’) + numtodsinterval(avg(end_time_second), ‘second’)),’hh24:mi:ss’) avg_end_time
–2019-07-01 00:00:00 + numtodsinterval (average, ‘seconds’) is converted to date format and then to time character format
from
(
select
— convert working hours to seconds
to_char(a.actontime, ‘hh24’) * 3600 +
to_char(a.actontime, ‘mi’) * 60 +
to_char(a.actontime, ‘ss’) as begin_time_second,
— convert off hours to seconds
to_char(a.actofftime, ‘hh24’) * 3600 +
to_char(a.actofftime, ‘mi’) * 60 +
to_char(a.actofftime, ‘ss’) as end_time_second
from empworkdate a
)
Recommended Today
Redis design and implementation 4: Dictionary Dict
In redis, the dictionary is the infrastructure. Redis database data, expiration time and hash type all take the dictionary as the underlying structure. Structure of dictionary Hashtable The implementation code of hash table is as follows:dict.h/dictht The dictionary of redis is implemented in the form of hash table. typedef struct dictht { //Hash table array, […]- full join ,left join ,right join,inner join
- Full join null padding
- Oracel empty string to 0, null to 0 processing method
- [20201204] why to return 2 rows of records.txt
- [20201208] why return 2-line record supplement.txt
- Oracle stored procedure 8: Pit 2 when stored procedure (end)
- Basic summary of orcla (2)
- Oracle sort one — null value processing
- Oracle database replication
- Oracle installation encountered enterprise manager configuration failure