Community FAQ
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
mdias_software
Engaged Sweeper III

Dear community,

Could any user help me with creating a report that tracks uninstalled software from the last 30 days?

 

Kind Regards,
Mateus Dias
1 ACCEPTED SOLUTION

Report for Windows:

 

Select Top 1000000 tblAssets.assetid,
  tblAssets.Domain,
  tblAssets.AssetName,
  tblAssets.OScode,
  tblAssets.Userdomain,
  tblAssets.Username,
  tblSoftwareUni.SoftwarePublisher,
  tblSoftwareUni.softwareName,
  tblsoftwareHist.softwareVersion,
  Max(tblsoftwareHist.Lastchanged) max_lastchanged,
  Case tblsoftwareHist.Action
    When 1 Then 'Added'
    When 2 Then 'Removed'
    When 3 Then 'Updated'
  End As Action
From tblsoftwareHist
  Inner Join tblSoftwareUni On tblSoftwareUni.SoftID = tblsoftwareHist.softid
  Inner Join tblAssets On tblAssets.AssetID = tblsoftwareHist.AssetID And
      tblsoftwareHist.Action = 2
  Left Join tblsoftware t On t.assetid = tblsoftwareHist.assetid And
      t.softid = tblsoftwareHist.softid
Where t.AssetID Is Null And tblsoftwareHist.Lastchanged > GetDate() - 30
Group By tblAssets.assetid,
  tblAssets.Domain,
  tblAssets.AssetName,
  tblAssets.OScode,
  tblAssets.Userdomain,
  tblAssets.Username,
  tblSoftwareUni.SoftwarePublisher,
  tblSoftwareUni.softwareName,
  tblsoftwareHist.softwareVersion,
  tblsoftwareHist.Action
Order By max_lastchanged Desc

 

View solution in original post

5 REPLIES 5
Mister_Nobody
Honored Sweeper II

Describe the algorithm in words - how should the query work?

Dear,

Basically, I would like to know the software that was uninstalled from my Windows and (Linux, if possible) assets.

 

Kind Regards,
Mateus Dias

LS doesn't support history for linux-assets.

Report for Windows:

 

Select Top 1000000 tblAssets.assetid,
  tblAssets.Domain,
  tblAssets.AssetName,
  tblAssets.OScode,
  tblAssets.Userdomain,
  tblAssets.Username,
  tblSoftwareUni.SoftwarePublisher,
  tblSoftwareUni.softwareName,
  tblsoftwareHist.softwareVersion,
  Max(tblsoftwareHist.Lastchanged) max_lastchanged,
  Case tblsoftwareHist.Action
    When 1 Then 'Added'
    When 2 Then 'Removed'
    When 3 Then 'Updated'
  End As Action
From tblsoftwareHist
  Inner Join tblSoftwareUni On tblSoftwareUni.SoftID = tblsoftwareHist.softid
  Inner Join tblAssets On tblAssets.AssetID = tblsoftwareHist.AssetID And
      tblsoftwareHist.Action = 2
  Left Join tblsoftware t On t.assetid = tblsoftwareHist.assetid And
      t.softid = tblsoftwareHist.softid
Where t.AssetID Is Null And tblsoftwareHist.Lastchanged > GetDate() - 30
Group By tblAssets.assetid,
  tblAssets.Domain,
  tblAssets.AssetName,
  tblAssets.OScode,
  tblAssets.Userdomain,
  tblAssets.Username,
  tblSoftwareUni.SoftwarePublisher,
  tblSoftwareUni.softwareName,
  tblsoftwareHist.softwareVersion,
  tblsoftwareHist.Action
Order By max_lastchanged Desc

 

Thank you, very much!

Kind Regards,
Mateus Dias

Reports & Analytics

Ask about reports you're interested in and share reports you've created. Subscribe to receive daily updates of reports shared in the Community.

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now