Třídová akce

Popis:
Zjistí počet použití pro neuložené Nové omezení za ProgPoint, Kind a měsíc a rok pro zadaného uživatele
Kód:
8
Tělo:
SELECT MonthOfUse, YearOfUse, sum(NumberOfUse) as NoUCount
FROM RestrictionUsages
WHERE
  (RestrictionDefinition_ID is null) and
  (ProgramPoint = :ProgPoint) and (Kind = :Kind) and 
  (User_ID = :User_ID) and
  (((MonthOfUse >= :MonthOfUse) and (YearOfUse = :YearOfUse - 1)) or ((MonthOfUse <= :MonthOfUse) and (YearOfUse = :YearOfUse)))
GROUP BY
  MonthOfUse, YearOfUse

Generated by ABRA Software a.s. 27.10.2021 16:34:11