This is a baseline for what I believe I am attempting to pull. I can pull the total pages ever printed on a printer on our network, using this:
Select Top 1000000 tblAssets.AssetName,
tblAssetCustom.Model As [Device model],
tblAssetCustom.Printerstatus As Status,
tblAssetCustom.PrintedMonoPages As [Printed Black & White Pages],
tblAssetCustom.PrintedColorPages As [Printed Color Pages],
tblAssetCustom.Printedpages As [Total Printed Pages],
tblAssets.Lastseen,
tblAssets.AssetID
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Where tblAssetCustom.Printedpages Is Not Null And tblAssetCustom.State = 1
Order By tblAssets.AssetNameHowever, I was informed of the possible parameter of "
tblAssets.Lastseen > getdate() - 30" to only pull the last 30 days of information. However when simply adding that to the scripting it is not capatible. Is what I am referring to even possible in a normal environment?