Forum Discussion

George_Dicu's avatar
10 years ago

Amount of data (active data, <45 days) for a customer

Hi, I have opened a new thread since the other one is closed. I was asked by management to do the following: A report for each customer in Netbackup, to reveal the amount of data within <=45...
  • RiaanBadenhorst's avatar
    9 years ago

    Hi George,

     

    Sorry for the delay, been a bit busy.

     

    This should do it.

    SELECT
    domain_jobimage.clientname as "Client Name",
    COALESCE(CAST(SUM(domain_image.sizeOfImageInKBytes)/1024.0/1024.0 AS NUMERIC (20,2)), 0) AS 'Protected Size (GB)'
    FROM
    domain_image, domain_jobimage
    WHERE
    domain_jobimage.imageid=domain_image.id
    AND
    DATEDIFF(day,UTCBigIntToNomTime(domain_image.writeEndTime), GETDATE()) <= 45
    GROUP BY
    "Client Name"