Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- with toto as (select name0,
- 'app1' = CASE WHEN arp.DisplayName0 = 'Microsoft Application Error Reporting' then 'TRUE' else NULL END,
- 'app2' = CASE WHEN arp.DisplayName0 = 'Microsoft Visual C++ 2008 Redistributable - x86 9.0.30729.6161' then 'TRUE' else NULL END
- from v_r_system vrs
- left join v_GS_ADD_REMOVE_PROGRAMS arp
- on vrs.ResourceID = arp.ResourceID)
- select name0, count(app1) as app1, count(app2) as app2
- from toto
- group by name0
- with toto as (select name0,
- 'app1' = CASE WHEN arp.DisplayName0 = 'Microsoft Application Error Reporting' then arp.Version0 else NULL END,
- 'app2' = CASE WHEN arp.DisplayName0 = 'Microsoft Visual C++ 2008 Redistributable - x86 9.0.30729.6161' then arp.Version0 else NULL END
- from v_r_system vrs
- left join v_GS_ADD_REMOVE_PROGRAMS arp
- on vrs.ResourceID = arp.ResourceID)
- select name0, min(app1) as app1, min(app2) as app2
- from toto
- group by name0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement