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

RHNUSERACTIONOVERVIEW

DDL script

Columns

NameTypeNullableInsertableUpdatableDeletableComment
ORG_IDNUMBER(38)NNONONO 
USER_IDNUMBER(38)NNONONO 
IDNUMBER(38)NNONONO 
TYPE_NAMEVARCHAR2(100)NNONONO 
SCHEDULERNUMBER(38)YNONONO 
EARLIEST_ACTIONTIMESTAMP(6) WITH LOCAL TIME ZONENNONONO 
ACTION_NAMEVARCHAR2(128)YNONONO 
ACTION_STATUS_IDNUMBER(38)NNONONO 
ACTION_STATUSVARCHAR2(16)YNONONO 
TALLYNUMBER(38)YNONONO 
ARCHIVEDNUMBER(38)NNONONO 

Query:

Legend: comment string keyword reserved word operator
select	ao.org_id                                       as org_id,
	usp.user_id                                     as user_id,
    	ao.action_id                                    as id,
	ao.type_name                                    as type_name,
        ao.scheduler                                    as scheduler,
	ao.earliest_action                              as earliest_action,
	coalesce( ao.name, ao.type_name )		as action_name,
	sa.status					as action_status_id,
	astat.name                                      as action_status,
	count(sa.action_id)				as tally,
	ao.archived                                     as archived
from	rhnActionStatus            astat,
    	rhnUserServerPerms         usp,
	rhnServerAction            sa,
	rhnActionOverview	   ao
where	ao.action_id = sa.action_id
  and   sa.server_id = usp.server_id
  and   sa.status = astat.id
group by ao.org_id,
	 usp.user_id,
	 ao.action_id,
	 ao.type_name,
	 ao.scheduler,
	 ao.earliest_action,
	 coalesce( ao.name, ao.type_name ),
	 sa.status,
	 astat.name,
	 ao.archived
order by earliest_action