Třídová akce

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