Skip to content

Instantly share code, notes, and snippets.

@bdietz400
Created January 15, 2020 21:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bdietz400/176c8625360336d88b90e58fb01b3cc0 to your computer and use it in GitHub Desktop.
Save bdietz400/176c8625360336d88b90e58fb01b3cc0 to your computer and use it in GitHub Desktop.
all spooled files subtotals by year/month/#splfs
SELECT current server as Sysname, YEAR(Create_Timestamp) AS Year_Created
,MONTH(Create_Timestamp) AS Month_Created
,COUNT(System) AS Spooled_Files
FROM Qsys2.Output_Queue_Entries_Basic
GROUP BY Grouping Sets (
(
MONTH(Create_Timestamp)
,YEAR(Create_Timestamp)
) -- "Detail"
,(YEAR(Create_Timestamp)) -- subtotal
,() -- Grand Total
)
ORDER BY Year_Created ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment