Třídová akce

Popis:
Za daný měsíc a rok dodá pro zadanou def.omezení celkový počet použití za všechny uživatele
Kód:
5
Tělo:
SELECT MonthOfUse, YearOfUse, sum(NumberOfUse) as NoUCount
FROM RestrictionUsages
WHERE
  (RestrictionDefinition_ID = :RestrictionDefinition_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