"Fossies" - the Fresh Open Source Software Archive

Member "bareos-Release-20.0.3/core/src/cats/dml/0008_list_jobs_count" (14 Sep 2021, 509 Bytes) of package /linux/misc/bareos-Release-20.0.3.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 # "WHERE JobId > 0" is a dummy where clause,
    2 #                   to make it easier to extend the filter
    3 #                   (all filters starts with "AND ...")
    4 # JOIN with Media is required for filter to Media.Volumename.
    5 
    6 SELECT DISTINCT COUNT(DISTINCT Job.JobId) as count
    7 FROM Job
    8 LEFT JOIN Client ON Client.ClientId=Job.ClientId
    9 LEFT JOIN JobMedia ON JobMedia.JobId=Job.JobId
   10 LEFT JOIN Media ON JobMedia.MediaId=Media.MediaId
   11 LEFT JOIN FileSet ON FileSet.FileSetId=Job.FileSetId
   12 WHERE Job.JobId > 0
   13 %s
   14 %s;