Home > database >  Through period of time can be detected during all the number of days off
Through period of time can be detected during all the number of days off

Time:09-26


How to put the above data into below, and ask for leave to pass the time find out all the number of days,

CodePudding user response:

A typical transfer line column, the test data and build table statements posted!

CodePudding user response:

The select people_name people_unit,
NVL (sum (case when QJLX='personal leave' then qj_num end), 0) as personal leave,
NVL (sum (case when QJLX='ask for leave to go out on business then qj_num end), 0) leave the as on business goes out,
- how many columns to add line
The sum (qj_num) as a combined
The from test6
Group by people_name people_unit;
  • Related