Advertisement
psi_mmobile

Untitled

Oct 15th, 2024
15
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. SELECT *
  2. FROM (
  3. SELECT
  4. WORKING_SCHEDULE_ID,
  5. NBR_HR,
  6. PH_MOBILITY,
  7. HP_MOBILITY,
  8. NBR_HR_AM,
  9. NBR_HR_PM,
  10. START_WORKING_TIME,
  11. STOP_WORKING_TIME,
  12. PAUSE_START_TIME,
  13. PAUSE_STOP_TIME,
  14. NBR_HR_FOR_ABSENCE,
  15. DAY_ID
  16. FROM OF_OWNER.WORKING_SCHEDULE_DAY
  17. )
  18. PIVOT (
  19. MAX(NBR_HR) AS NBR_HR,
  20. MAX(PH_MOBILITY) AS PH_MOBILITY,
  21. MAX(HP_MOBILITY) AS HP_MOBILITY,
  22. MAX(NBR_HR_AM) AS NBR_HR_AM,
  23. MAX(NBR_HR_PM) AS NBR_HR_PM,
  24. MAX(START_WORKING_TIME) AS START_WORKING_TIME,
  25. MAX(STOP_WORKING_TIME) AS STOP_WORKING_TIME,
  26. MAX(PAUSE_START_TIME) AS PAUSE_START_TIME,
  27. MAX(PAUSE_STOP_TIME) AS PAUSE_STOP_TIME,
  28. MAX(NBR_HR_FOR_ABSENCE) AS NBR_HR_FOR_ABSENCE
  29. FOR DAY_ID IN (1 AS MONDAY, 2 AS TUESDAY, 3 AS WEDNESDAY, 4 AS THURSDAY,
  30. 5 AS FRIDAY, 6 AS SATURDAY, 7 AS SUNDAY)
  31. )
  32. ORDER BY WORKING_SCHEDULE_ID;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement