Advertisement
Guest User

Untitled

a guest
Jan 16th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. with toto as (select name0,
  2. 'app1' = CASE WHEN arp.DisplayName0 = 'Microsoft Application Error Reporting' then 'TRUE' else NULL END,
  3. 'app2' = CASE WHEN arp.DisplayName0 = 'Microsoft Visual C++ 2008 Redistributable - x86 9.0.30729.6161' then 'TRUE' else NULL END
  4. from v_r_system vrs
  5. left join v_GS_ADD_REMOVE_PROGRAMS arp
  6. on vrs.ResourceID = arp.ResourceID)
  7. select name0, count(app1) as app1, count(app2) as app2
  8. from toto
  9. group by name0
  10.  
  11.  
  12.  
  13.  
  14. with toto as (select name0,
  15. 'app1' = CASE WHEN arp.DisplayName0 = 'Microsoft Application Error Reporting' then arp.Version0 else NULL END,
  16. 'app2' = CASE WHEN arp.DisplayName0 = 'Microsoft Visual C++ 2008 Redistributable - x86 9.0.30729.6161' then arp.Version0 else NULL END
  17. from v_r_system vrs
  18. left join v_GS_ADD_REMOVE_PROGRAMS arp
  19. on vrs.ResourceID = arp.ResourceID)
  20. select name0, min(app1) as app1, min(app2) as app2
  21. from toto
  22. group by name0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement