
CREATE VIEW LD0V3L93 AS
SELECT AVDELNING, 
       COUNT(*) AS ANTALPLACERADE
FROM LD0VYL93 
WHERE FROMDAT <= TO_CHAR(SYSDATE, 'YYYYMMDD') AND
      TOMDAT >= TO_CHAR(SYSDATE, 'YYYYMMDD')
GROUP BY AVDELNING;
