Main Tables Views Materialized Views Indexes Constraints Triggers Procedures Functions Packages Sequences Java Sources Sanity Check Index DDL scrips
Description Columns Query Constraints Triggers

RHNUSERAPPLETOVERVIEW

DDL script

Columns

NameTypeNullableInsertableUpdatableDeletableComment
USER_IDNUMBER(38)NNONONO 
SECURITY_COUNTNUMBER(38)YNONONO 
BUG_COUNTNUMBER(38)YNONONO 
ENHANCEMENT_COUNTNUMBER(38)YNONONO 

Query:

Legend: comment string keyword reserved word operator
SELECT      USP.user_id,
    	    SUM((SELECT COUNT(*) FROM rhnServerErrataTypeView SEV
	         WHERE SEV.server_id = USP.server_id
	         AND SEV.errata_type = 'Security Advisory')),
    	    SUM((SELECT COUNT(*) FROM rhnServerErrataTypeView SEV
	         WHERE SEV.server_id = USP.server_id
	         AND SEV.errata_type = 'Bug Fix Advisory')),
    	    SUM((SELECT COUNT(*) FROM rhnServerErrataTypeView SEV
	         WHERE SEV.server_id = USP.server_id
	         AND SEV.errata_type = 'Product Enhancement Advisory'))
FROM        rhnUserServerPerms USP
GROUP BY    USP.user_id