Mysql程序

drop table if exists comp_ap;
create table comp_ap  as
select ProjectName, ModelCode, 'AP_ACMClosed' Component, AP_ACMTotal as Total, AP_ACMClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_ACMResolved' Component, AP_ACMTotal as Total, AP_ACMResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_ACMRejected' Component, AP_ACMTotal as Total, AP_ACMRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_ACMPending' Component, AP_ACMTotal as Total, AP_ACMPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_AIRClosed' Component, AP_AIRTotal as Total, AP_AIRClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_AIRResolved' Component, AP_AIRTotal as Total, AP_AIRResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_AIRRejected' Component, AP_AIRTotal as Total, AP_AIRRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_AIRPending' Component, AP_AIRTotal as Total, AP_AIRPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_AVCaptureNonSmartClosed' Component, AP_AVCaptureNonSmartTotal as Total, AP_AVCaptureNonSmartClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_AVCaptureNonSmartResolved' Component, AP_AVCaptureNonSmartTotal as Total, AP_AVCaptureNonSmartResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_AVCaptureNonSmartRejected' Component, AP_AVCaptureNonSmartTotal as Total, AP_AVCaptureNonSmartRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_AVCaptureNonSmartPending' Component, AP_AVCaptureNonSmartTotal as Total, AP_AVCaptureNonSmartPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_AppSolutionClosed' Component, AP_AppSolutionTotal as Total, AP_AppSolutionClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_AppSolutionResolved' Component, AP_AppSolutionTotal as Total, AP_AppSolutionResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_AppSolutionRejected' Component, AP_AppSolutionTotal as Total, AP_AppSolutionRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_AppSolutionPending' Component, AP_AppSolutionTotal as Total, AP_AppSolutionPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_BillingClosed' Component, AP_BillingTotal as Total, AP_BillingClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_BillingResolved' Component, AP_BillingTotal as Total, AP_BillingResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_BillingRejected' Component, AP_BillingTotal as Total, AP_BillingRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_BillingPending' Component, AP_BillingTotal as Total, AP_BillingPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_CBREClosed' Component, AP_CBRETotal as Total, AP_CBREClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_CBREResolved' Component, AP_CBRETotal as Total, AP_CBREResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_CBRERejected' Component, AP_CBRETotal as Total, AP_CBRERejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_CBREPending' Component, AP_CBRETotal as Total, AP_CBREPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_CSFClosed' Component, AP_CSFTotal as Total, AP_CSFClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_CSFResolved' Component, AP_CSFTotal as Total, AP_CSFResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_CSFRejected' Component, AP_CSFTotal as Total, AP_CSFRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_CSFPending' Component, AP_CSFTotal as Total, AP_CSFPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_CallaMWClosed' Component, AP_CallaMWTotal as Total, AP_CallaMWClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_CallaMWResolved' Component, AP_CallaMWTotal as Total, AP_CallaMWResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_CallaMWRejected' Component, AP_CallaMWTotal as Total, AP_CallaMWRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_CallaMWPending' Component, AP_CallaMWTotal as Total, AP_CallaMWPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_CameraFWClosed' Component, AP_CameraFWTotal as Total, AP_CameraFWClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_CameraFWResolved' Component, AP_CameraFWTotal as Total, AP_CameraFWResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_CameraFWRejected' Component, AP_CameraFWTotal as Total, AP_CameraFWRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_CameraFWPending' Component, AP_CameraFWTotal as Total, AP_CameraFWPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_CameraTVClosed' Component, AP_CameraTVTotal as Total, AP_CameraTVClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_CameraTVResolved' Component, AP_CameraTVTotal as Total, AP_CameraTVResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_CameraTVRejected' Component, AP_CameraTVTotal as Total, AP_CameraTVRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_CameraTVPending' Component, AP_CameraTVTotal as Total, AP_CameraTVPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_CherryMWClosed' Component, AP_CherryMWTotal as Total, AP_CherryMWClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_CherryMWResolved' Component, AP_CherryMWTotal as Total, AP_CherryMWResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_CherryMWRejected' Component, AP_CherryMWTotal as Total, AP_CherryMWRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_CherryMWPending' Component, AP_CherryMWTotal as Total, AP_CherryMWPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_CherryNetNonSmartClosed' Component, AP_CherryNetNonSmartTotal as Total, AP_CherryNetNonSmartClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_CherryNetNonSmartResolved' Component, AP_CherryNetNonSmartTotal as Total, AP_CherryNetNonSmartResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_CherryNetNonSmartRejected' Component, AP_CherryNetNonSmartTotal as Total, AP_CherryNetNonSmartRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_CherryNetNonSmartPending' Component, AP_CherryNetNonSmartTotal as Total, AP_CherryNetNonSmartPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_ChinaDiffClosed' Component, AP_ChinaDiffTotal as Total, AP_ChinaDiffClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_ChinaDiffResolved' Component, AP_ChinaDiffTotal as Total, AP_ChinaDiffResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_ChinaDiffRejected' Component, AP_ChinaDiffTotal as Total, AP_ChinaDiffRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_ChinaDiffPending' Component, AP_ChinaDiffTotal as Total, AP_ChinaDiffPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_ConversationAppClosed' Component, AP_ConversationAppTotal as Total, AP_ConversationAppClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_ConversationAppResolved' Component, AP_ConversationAppTotal as Total, AP_ConversationAppResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_ConversationAppRejected' Component, AP_ConversationAppTotal as Total, AP_ConversationAppRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_ConversationAppPending' Component, AP_ConversationAppTotal as Total, AP_ConversationAppPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_DLNAClosed' Component, AP_DLNATotal as Total, AP_DLNAClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_DLNAResolved' Component, AP_DLNATotal as Total, AP_DLNAResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_DLNARejected' Component, AP_DLNATotal as Total, AP_DLNARejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_DLNAPending' Component, AP_DLNATotal as Total, AP_DLNAPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_DLNANonSmartClosed' Component, AP_DLNANonSmartTotal as Total, AP_DLNANonSmartClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_DLNANonSmartResolved' Component, AP_DLNANonSmartTotal as Total, AP_DLNANonSmartResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_DLNANonSmartRejected' Component, AP_DLNANonSmartTotal as Total, AP_DLNANonSmartRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_DLNANonSmartPending' Component, AP_DLNANonSmartTotal as Total, AP_DLNANonSmartPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_DialogEngineClosed' Component, AP_DialogEngineTotal as Total, AP_DialogEngineClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_DialogEngineResolved' Component, AP_DialogEngineTotal as Total, AP_DialogEngineResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_DialogEngineRejected' Component, AP_DialogEngineTotal as Total, AP_DialogEngineRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_DialogEnginePending' Component, AP_DialogEngineTotal as Total, AP_DialogEnginePending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_DualTVClosed' Component, AP_DualTVTotal as Total, AP_DualTVClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_DualTVResolved' Component, AP_DualTVTotal as Total, AP_DualTVResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_DualTVRejected' Component, AP_DualTVTotal as Total, AP_DualTVRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_DualTVPending' Component, AP_DualTVTotal as Total, AP_DualTVPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_ExternalAppsClosed' Component, AP_ExternalAppsTotal as Total, AP_ExternalAppsClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_ExternalAppsResolved' Component, AP_ExternalAppsTotal as Total, AP_ExternalAppsResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_ExternalAppsRejected' Component, AP_ExternalAppsTotal as Total, AP_ExternalAppsRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_ExternalAppsPending' Component, AP_ExternalAppsTotal as Total, AP_ExternalAppsPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_FlashPluginClosed' Component, AP_FlashPluginTotal as Total, AP_FlashPluginClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_FlashPluginResolved' Component, AP_FlashPluginTotal as Total, AP_FlashPluginResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_FlashPluginRejected' Component, AP_FlashPluginTotal as Total, AP_FlashPluginRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_FlashPluginPending' Component, AP_FlashPluginTotal as Total, AP_FlashPluginPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_GameFrontClosed' Component, AP_GameFrontTotal as Total, AP_GameFrontClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_GameFrontResolved' Component, AP_GameFrontTotal as Total, AP_GameFrontResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_GameFrontRejected' Component, AP_GameFrontTotal as Total, AP_GameFrontRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_GameFrontPending' Component, AP_GameFrontTotal as Total, AP_GameFrontPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_GingaNCLClosed' Component, AP_GingaNCLTotal as Total, AP_GingaNCLClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_GingaNCLResolved' Component, AP_GingaNCLTotal as Total, AP_GingaNCLResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_GingaNCLRejected' Component, AP_GingaNCLTotal as Total, AP_GingaNCLRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_GingaNCLPending' Component, AP_GingaNCLTotal as Total, AP_GingaNCLPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_GingaNCLNonSmartClosed' Component, AP_GingaNCLNonSmartTotal as Total, AP_GingaNCLNonSmartClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_GingaNCLNonSmartResolved' Component, AP_GingaNCLNonSmartTotal as Total, AP_GingaNCLNonSmartResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_GingaNCLNonSmartRejected' Component, AP_GingaNCLNonSmartTotal as Total, AP_GingaNCLNonSmartRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_GingaNCLNonSmartPending' Component, AP_GingaNCLNonSmartTotal as Total, AP_GingaNCLNonSmartPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_GplayerClosed' Component, AP_GplayerTotal as Total, AP_GplayerClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_GplayerResolved' Component, AP_GplayerTotal as Total, AP_GplayerResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_GplayerRejected' Component, AP_GplayerTotal as Total, AP_GplayerRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_GplayerPending' Component, AP_GplayerTotal as Total, AP_GplayerPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_HbbTVClosed' Component, AP_HbbTVTotal as Total, AP_HbbTVClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_HbbTVResolved' Component, AP_HbbTVTotal as Total, AP_HbbTVResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_HbbTVRejected' Component, AP_HbbTVTotal as Total, AP_HbbTVRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_HbbTVPending' Component, AP_HbbTVTotal as Total, AP_HbbTVPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_HdmiCecClosed' Component, AP_HdmiCecTotal as Total, AP_HdmiCecClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_HdmiCecResolved' Component, AP_HdmiCecTotal as Total, AP_HdmiCecResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_HdmiCecRejected' Component, AP_HdmiCecTotal as Total, AP_HdmiCecRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_HdmiCecPending' Component, AP_HdmiCecTotal as Total, AP_HdmiCecPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_IPTVClosed' Component, AP_IPTVTotal as Total, AP_IPTVClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_IPTVResolved' Component, AP_IPTVTotal as Total, AP_IPTVResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_IPTVRejected' Component, AP_IPTVTotal as Total, AP_IPTVRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_IPTVPending' Component, AP_IPTVTotal as Total, AP_IPTVPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_InfoLinkClosed' Component, AP_InfoLinkTotal as Total, AP_InfoLinkClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_InfoLinkResolved' Component, AP_InfoLinkTotal as Total, AP_InfoLinkResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_InfoLinkRejected' Component, AP_InfoLinkTotal as Total, AP_InfoLinkRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_InfoLinkPending' Component, AP_InfoLinkTotal as Total, AP_InfoLinkPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_InformationClosed' Component, AP_InformationTotal as Total, AP_InformationClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_InformationResolved' Component, AP_InformationTotal as Total, AP_InformationResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_InformationRejected' Component, AP_InformationTotal as Total, AP_InformationRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_InformationPending' Component, AP_InformationTotal as Total, AP_InformationPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_MMAppClosed' Component, AP_MMAppTotal as Total, AP_MMAppClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_MMAppResolved' Component, AP_MMAppTotal as Total, AP_MMAppResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_MMAppRejected' Component, AP_MMAppTotal as Total, AP_MMAppRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_MMAppPending' Component, AP_MMAppTotal as Total, AP_MMAppPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_MMAppNonSmartClosed' Component, AP_MMAppNonSmartTotal as Total, AP_MMAppNonSmartClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_MMAppNonSmartResolved' Component, AP_MMAppNonSmartTotal as Total, AP_MMAppNonSmartResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_MMAppNonSmartRejected' Component, AP_MMAppNonSmartTotal as Total, AP_MMAppNonSmartRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_MMAppNonSmartPending' Component, AP_MMAppNonSmartTotal as Total, AP_MMAppNonSmartPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_MiniSmartHubClosed' Component, AP_MiniSmartHubTotal as Total, AP_MiniSmartHubClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_MiniSmartHubResolved' Component, AP_MiniSmartHubTotal as Total, AP_MiniSmartHubResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_MiniSmartHubRejected' Component, AP_MiniSmartHubTotal as Total, AP_MiniSmartHubRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_MiniSmartHubPending' Component, AP_MiniSmartHubTotal as Total, AP_MiniSmartHubPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_NOAClosed' Component, AP_NOATotal as Total, AP_NOAClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_NOAResolved' Component, AP_NOATotal as Total, AP_NOAResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_NOARejected' Component, AP_NOATotal as Total, AP_NOARejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_NOAPending' Component, AP_NOATotal as Total, AP_NOAPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_NetworkAppClosed' Component, AP_NetworkAppTotal as Total, AP_NetworkAppClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_NetworkAppResolved' Component, AP_NetworkAppTotal as Total, AP_NetworkAppResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_NetworkAppRejected' Component, AP_NetworkAppTotal as Total, AP_NetworkAppRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_NetworkAppPending' Component, AP_NetworkAppTotal as Total, AP_NetworkAppPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_PVODClosed' Component, AP_PVODTotal as Total, AP_PVODClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_PVODResolved' Component, AP_PVODTotal as Total, AP_PVODResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_PVODRejected' Component, AP_PVODTotal as Total, AP_PVODRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_PVODPending' Component, AP_PVODTotal as Total, AP_PVODPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_PVRClosed' Component, AP_PVRTotal as Total, AP_PVRClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_PVRResolved' Component, AP_PVRTotal as Total, AP_PVRResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_PVRRejected' Component, AP_PVRTotal as Total, AP_PVRRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_PVRPending' Component, AP_PVRTotal as Total, AP_PVRPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_RMClosed' Component, AP_RMTotal as Total, AP_RMClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_RMResolved' Component, AP_RMTotal as Total, AP_RMResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_RMRejected' Component, AP_RMTotal as Total, AP_RMRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_RMPending' Component, AP_RMTotal as Total, AP_RMPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_RecogEngineMWClosed' Component, AP_RecogEngineMWTotal as Total, AP_RecogEngineMWClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_RecogEngineMWResolved' Component, AP_RecogEngineMWTotal as Total, AP_RecogEngineMWResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_RecogEngineMWRejected' Component, AP_RecogEngineMWTotal as Total, AP_RecogEngineMWRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_RecogEngineMWPending' Component, AP_RecogEngineMWTotal as Total, AP_RecogEngineMWPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_RecognitionClosed' Component, AP_RecognitionTotal as Total, AP_RecognitionClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_RecognitionResolved' Component, AP_RecognitionTotal as Total, AP_RecognitionResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_RecognitionRejected' Component, AP_RecognitionTotal as Total, AP_RecognitionRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_RecognitionPending' Component, AP_RecognitionTotal as Total, AP_RecognitionPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_RemoteClosed' Component, AP_RemoteTotal as Total, AP_RemoteClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_RemoteResolved' Component, AP_RemoteTotal as Total, AP_RemoteResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_RemoteRejected' Component, AP_RemoteTotal as Total, AP_RemoteRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_RemotePending' Component, AP_RemoteTotal as Total, AP_RemotePending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_RemoteNonSmartClosed' Component, AP_RemoteNonSmartTotal as Total, AP_RemoteNonSmartClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_RemoteNonSmartResolved' Component, AP_RemoteNonSmartTotal as Total, AP_RemoteNonSmartResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_RemoteNonSmartRejected' Component, AP_RemoteNonSmartTotal as Total, AP_RemoteNonSmartRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_RemoteNonSmartPending' Component, AP_RemoteNonSmartTotal as Total, AP_RemoteNonSmartPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_RemoteAccessClosed' Component, AP_RemoteAccessTotal as Total, AP_RemoteAccessClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_RemoteAccessResolved' Component, AP_RemoteAccessTotal as Total, AP_RemoteAccessResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_RemoteAccessRejected' Component, AP_RemoteAccessTotal as Total, AP_RemoteAccessRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_RemoteAccessPending' Component, AP_RemoteAccessTotal as Total, AP_RemoteAccessPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_RoseMWClosed' Component, AP_RoseMWTotal as Total, AP_RoseMWClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_RoseMWResolved' Component, AP_RoseMWTotal as Total, AP_RoseMWResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_RoseMWRejected' Component, AP_RoseMWTotal as Total, AP_RoseMWRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_RoseMWPending' Component, AP_RoseMWTotal as Total, AP_RoseMWPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_RoseMWNonSmartClosed' Component, AP_RoseMWNonSmartTotal as Total, AP_RoseMWNonSmartClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_RoseMWNonSmartResolved' Component, AP_RoseMWNonSmartTotal as Total, AP_RoseMWNonSmartResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_RoseMWNonSmartRejected' Component, AP_RoseMWNonSmartTotal as Total, AP_RoseMWNonSmartRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_RoseMWNonSmartPending' Component, AP_RoseMWNonSmartTotal as Total, AP_RoseMWNonSmartPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_SDKClosed' Component, AP_SDKTotal as Total, AP_SDKClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_SDKResolved' Component, AP_SDKTotal as Total, AP_SDKResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_SDKRejected' Component, AP_SDKTotal as Total, AP_SDKRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_SDKPending' Component, AP_SDKTotal as Total, AP_SDKPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_SMTClosed' Component, AP_SMTTotal as Total, AP_SMTClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_SMTResolved' Component, AP_SMTTotal as Total, AP_SMTResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_SMTRejected' Component, AP_SMTTotal as Total, AP_SMTRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_SMTPending' Component, AP_SMTTotal as Total, AP_SMTPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_SNAPClosed' Component, AP_SNAPTotal as Total, AP_SNAPClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_SNAPResolved' Component, AP_SNAPTotal as Total, AP_SNAPResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_SNAPRejected' Component, AP_SNAPTotal as Total, AP_SNAPRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_SNAPPending' Component, AP_SNAPTotal as Total, AP_SNAPPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_SSOClosed' Component, AP_SSOTotal as Total, AP_SSOClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_SSOResolved' Component, AP_SSOTotal as Total, AP_SSOResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_SSORejected' Component, AP_SSOTotal as Total, AP_SSORejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_SSOPending' Component, AP_SSOTotal as Total, AP_SSOPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_SWUpgradeClosed' Component, AP_SWUpgradeTotal as Total, AP_SWUpgradeClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_SWUpgradeResolved' Component, AP_SWUpgradeTotal as Total, AP_SWUpgradeResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_SWUpgradeRejected' Component, AP_SWUpgradeTotal as Total, AP_SWUpgradeRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_SWUpgradePending' Component, AP_SWUpgradeTotal as Total, AP_SWUpgradePending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_SWUpgradeNonSmartClosed' Component, AP_SWUpgradeNonSmartTotal as Total, AP_SWUpgradeNonSmartClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_SWUpgradeNonSmartResolved' Component, AP_SWUpgradeNonSmartTotal as Total, AP_SWUpgradeNonSmartResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_SWUpgradeNonSmartRejected' Component, AP_SWUpgradeNonSmartTotal as Total, AP_SWUpgradeNonSmartRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_SWUpgradeNonSmartPending' Component, AP_SWUpgradeNonSmartTotal as Total, AP_SWUpgradeNonSmartPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_SecurityClosed' Component, AP_SecurityTotal as Total, AP_SecurityClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_SecurityResolved' Component, AP_SecurityTotal as Total, AP_SecurityResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_SecurityRejected' Component, AP_SecurityTotal as Total, AP_SecurityRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_SecurityPending' Component, AP_SecurityTotal as Total, AP_SecurityPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_SecurityNonSmartClosed' Component, AP_SecurityNonSmartTotal as Total, AP_SecurityNonSmartClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_SecurityNonSmartResolved' Component, AP_SecurityNonSmartTotal as Total, AP_SecurityNonSmartResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_SecurityNonSmartRejected' Component, AP_SecurityNonSmartTotal as Total, AP_SecurityNonSmartRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_SecurityNonSmartPending' Component, AP_SecurityNonSmartTotal as Total, AP_SecurityNonSmartPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_SmartGuideClosed' Component, AP_SmartGuideTotal as Total, AP_SmartGuideClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_SmartGuideResolved' Component, AP_SmartGuideTotal as Total, AP_SmartGuideResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_SmartGuideRejected' Component, AP_SmartGuideTotal as Total, AP_SmartGuideRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_SmartGuidePending' Component, AP_SmartGuideTotal as Total, AP_SmartGuidePending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_SmartHomeClosed' Component, AP_SmartHomeTotal as Total, AP_SmartHomeClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_SmartHomeResolved' Component, AP_SmartHomeTotal as Total, AP_SmartHomeResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_SmartHomeRejected' Component, AP_SmartHomeTotal as Total, AP_SmartHomeRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_SmartHomePending' Component, AP_SmartHomeTotal as Total, AP_SmartHomePending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_SmartViewClosed' Component, AP_SmartViewTotal as Total, AP_SmartViewClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_SmartViewResolved' Component, AP_SmartViewTotal as Total, AP_SmartViewResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_SmartViewRejected' Component, AP_SmartViewTotal as Total, AP_SmartViewRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_SmartViewPending' Component, AP_SmartViewTotal as Total, AP_SmartViewPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_SoccerClosed' Component, AP_SoccerTotal as Total, AP_SoccerClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_SoccerResolved' Component, AP_SoccerTotal as Total, AP_SoccerResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_SoccerRejected' Component, AP_SoccerTotal as Total, AP_SoccerRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_SoccerPending' Component, AP_SoccerTotal as Total, AP_SoccerPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_SocialPanelClosed' Component, AP_SocialPanelTotal as Total, AP_SocialPanelClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_SocialPanelResolved' Component, AP_SocialPanelTotal as Total, AP_SocialPanelResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_SocialPanelRejected' Component, AP_SocialPanelTotal as Total, AP_SocialPanelRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_SocialPanelPending' Component, AP_SocialPanelTotal as Total, AP_SocialPanelPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_WebAppCoreClosed' Component, AP_WebAppCoreTotal as Total, AP_WebAppCoreClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_WebAppCoreResolved' Component, AP_WebAppCoreTotal as Total, AP_WebAppCoreResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_WebAppCoreRejected' Component, AP_WebAppCoreTotal as Total, AP_WebAppCoreRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_WebAppCorePending' Component, AP_WebAppCoreTotal as Total, AP_WebAppCorePending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_WebBrowserClosed' Component, AP_WebBrowserTotal as Total, AP_WebBrowserClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_WebBrowserResolved' Component, AP_WebBrowserTotal as Total, AP_WebBrowserResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_WebBrowserRejected' Component, AP_WebBrowserTotal as Total, AP_WebBrowserRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_WebBrowserPending' Component, AP_WebBrowserTotal as Total, AP_WebBrowserPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_WebEngineClosed' Component, AP_WebEngineTotal as Total, AP_WebEngineClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_WebEngineResolved' Component, AP_WebEngineTotal as Total, AP_WebEngineResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_WebEngineRejected' Component, AP_WebEngineTotal as Total, AP_WebEngineRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_WebEnginePending' Component, AP_WebEngineTotal as Total, AP_WebEnginePending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_WebServerClosed' Component, AP_WebServerTotal as Total, AP_WebServerClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_WebServerResolved' Component, AP_WebServerTotal as Total, AP_WebServerResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_WebServerRejected' Component, AP_WebServerTotal as Total, AP_WebServerRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_WebServerPending' Component, AP_WebServerTotal as Total, AP_WebServerPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'AP_WebUIFrameworkClosed' Component, AP_WebUIFrameworkTotal as Total, AP_WebUIFrameworkClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_WebUIFrameworkResolved' Component, AP_WebUIFrameworkTotal as Total, AP_WebUIFrameworkResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_WebUIFrameworkRejected' Component, AP_WebUIFrameworkTotal as Total, AP_WebUIFrameworkRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'AP_WebUIFrameworkPending' Component, AP_WebUIFrameworkTotal as Total, AP_WebUIFrameworkPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'PlanningClosed' Component, PlanningTotal as Total, PlanningClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'PlanningResolved' Component, PlanningTotal as Total, PlanningResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'PlanningRejected' Component, PlanningTotal as Total, PlanningRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'PlanningPending' Component, PlanningTotal as Total, PlanningPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'Svc_OperationClosed' Component, Svc_OperationTotal as Total, Svc_OperationClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svc_OperationResolved' Component, Svc_OperationTotal as Total, Svc_OperationResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svc_OperationRejected' Component, Svc_OperationTotal as Total, Svc_OperationRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svc_OperationPending' Component, Svc_OperationTotal as Total, Svc_OperationPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'Svr_AppsClosed' Component, Svr_AppsTotal as Total, Svr_AppsClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_AppsResolved' Component, Svr_AppsTotal as Total, Svr_AppsResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_AppsRejected' Component, Svr_AppsTotal as Total, Svr_AppsRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_AppsPending' Component, Svr_AppsTotal as Total, Svr_AppsPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'Svr_BigDataClosed' Component, Svr_BigDataTotal as Total, Svr_BigDataClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_BigDataResolved' Component, Svr_BigDataTotal as Total, Svr_BigDataResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_BigDataRejected' Component, Svr_BigDataTotal as Total, Svr_BigDataRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_BigDataPending' Component, Svr_BigDataTotal as Total, Svr_BigDataPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'Svr_BillingClosed' Component, Svr_BillingTotal as Total, Svr_BillingClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_BillingResolved' Component, Svr_BillingTotal as Total, Svr_BillingResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_BillingRejected' Component, Svr_BillingTotal as Total, Svr_BillingRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_BillingPending' Component, Svr_BillingTotal as Total, Svr_BillingPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'Svr_ClipsClosed' Component, Svr_ClipsTotal as Total, Svr_ClipsClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_ClipsResolved' Component, Svr_ClipsTotal as Total, Svr_ClipsResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_ClipsRejected' Component, Svr_ClipsTotal as Total, Svr_ClipsRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_ClipsPending' Component, Svr_ClipsTotal as Total, Svr_ClipsPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'Svr_DPIClosed' Component, Svr_DPITotal as Total, Svr_DPIClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_DPIResolved' Component, Svr_DPITotal as Total, Svr_DPIResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_DPIRejected' Component, Svr_DPITotal as Total, Svr_DPIRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_DPIPending' Component, Svr_DPITotal as Total, Svr_DPIPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'Svr_DeviceInfraClosed' Component, Svr_DeviceInfraTotal as Total, Svr_DeviceInfraClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_DeviceInfraResolved' Component, Svr_DeviceInfraTotal as Total, Svr_DeviceInfraResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_DeviceInfraRejected' Component, Svr_DeviceInfraTotal as Total, Svr_DeviceInfraRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_DeviceInfraPending' Component, Svr_DeviceInfraTotal as Total, Svr_DeviceInfraPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'Svr_EMSClosed' Component, Svr_EMSTotal as Total, Svr_EMSClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_EMSResolved' Component, Svr_EMSTotal as Total, Svr_EMSResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_EMSRejected' Component, Svr_EMSTotal as Total, Svr_EMSRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_EMSPending' Component, Svr_EMSTotal as Total, Svr_EMSPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'Svr_GameClosed' Component, Svr_GameTotal as Total, Svr_GameClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_GameResolved' Component, Svr_GameTotal as Total, Svr_GameResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_GameRejected' Component, Svr_GameTotal as Total, Svr_GameRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_GamePending' Component, Svr_GameTotal as Total, Svr_GamePending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'Svr_HotelClosed' Component, Svr_HotelTotal as Total, Svr_HotelClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_HotelResolved' Component, Svr_HotelTotal as Total, Svr_HotelResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_HotelRejected' Component, Svr_HotelTotal as Total, Svr_HotelRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_HotelPending' Component, Svr_HotelTotal as Total, Svr_HotelPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'Svr_NewsOnClosed' Component, Svr_NewsOnTotal as Total, Svr_NewsOnClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_NewsOnResolved' Component, Svr_NewsOnTotal as Total, Svr_NewsOnResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_NewsOnRejected' Component, Svr_NewsOnTotal as Total, Svr_NewsOnRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_NewsOnPending' Component, Svr_NewsOnTotal as Total, Svr_NewsOnPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'Svr_OTNClosed' Component, Svr_OTNTotal as Total, Svr_OTNClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_OTNResolved' Component, Svr_OTNTotal as Total, Svr_OTNResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_OTNRejected' Component, Svr_OTNTotal as Total, Svr_OTNRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_OTNPending' Component, Svr_OTNTotal as Total, Svr_OTNPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'Svr_OnTVClosed' Component, Svr_OnTVTotal as Total, Svr_OnTVClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_OnTVResolved' Component, Svr_OnTVTotal as Total, Svr_OnTVResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_OnTVRejected' Component, Svr_OnTVTotal as Total, Svr_OnTVRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_OnTVPending' Component, Svr_OnTVTotal as Total, Svr_OnTVPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'Svr_Q_BeClosed' Component, Svr_Q_BeTotal as Total, Svr_Q_BeClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_Q_BeResolved' Component, Svr_Q_BeTotal as Total, Svr_Q_BeResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_Q_BeRejected' Component, Svr_Q_BeTotal as Total, Svr_Q_BeRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_Q_BePending' Component, Svr_Q_BeTotal as Total, Svr_Q_BePending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'Svr_RMClosed' Component, Svr_RMTotal as Total, Svr_RMClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_RMResolved' Component, Svr_RMTotal as Total, Svr_RMResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_RMRejected' Component, Svr_RMTotal as Total, Svr_RMRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_RMPending' Component, Svr_RMTotal as Total, Svr_RMPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'Svr_RSCMClosed' Component, Svr_RSCMTotal as Total, Svr_RSCMClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_RSCMResolved' Component, Svr_RSCMTotal as Total, Svr_RSCMResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_RSCMRejected' Component, Svr_RSCMTotal as Total, Svr_RSCMRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_RSCMPending' Component, Svr_RSCMTotal as Total, Svr_RSCMPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'Svr_SASClosed' Component, Svr_SASTotal as Total, Svr_SASClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_SASResolved' Component, Svr_SASTotal as Total, Svr_SASResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_SASRejected' Component, Svr_SASTotal as Total, Svr_SASRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_SASPending' Component, Svr_SASTotal as Total, Svr_SASPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'Svr_SSOClosed' Component, Svr_SSOTotal as Total, Svr_SSOClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_SSOResolved' Component, Svr_SSOTotal as Total, Svr_SSOResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_SSORejected' Component, Svr_SSOTotal as Total, Svr_SSORejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_SSOPending' Component, Svr_SSOTotal as Total, Svr_SSOPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'Svr_SearchAllClosed' Component, Svr_SearchAllTotal as Total, Svr_SearchAllClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_SearchAllResolved' Component, Svr_SearchAllTotal as Total, Svr_SearchAllResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_SearchAllRejected' Component, Svr_SearchAllTotal as Total, Svr_SearchAllRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_SearchAllPending' Component, Svr_SearchAllTotal as Total, Svr_SearchAllPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'Svr_ServicePlatformClosed' Component, Svr_ServicePlatformTotal as Total, Svr_ServicePlatformClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_ServicePlatformResolved' Component, Svr_ServicePlatformTotal as Total, Svr_ServicePlatformResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_ServicePlatformRejected' Component, Svr_ServicePlatformTotal as Total, Svr_ServicePlatformRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_ServicePlatformPending' Component, Svr_ServicePlatformTotal as Total, Svr_ServicePlatformPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'Svr_SignatureClosed' Component, Svr_SignatureTotal as Total, Svr_SignatureClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_SignatureResolved' Component, Svr_SignatureTotal as Total, Svr_SignatureResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_SignatureRejected' Component, Svr_SignatureTotal as Total, Svr_SignatureRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_SignaturePending' Component, Svr_SignatureTotal as Total, Svr_SignaturePending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'Svr_SoccerClosed' Component, Svr_SoccerTotal as Total, Svr_SoccerClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_SoccerResolved' Component, Svr_SoccerTotal as Total, Svr_SoccerResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_SoccerRejected' Component, Svr_SoccerTotal as Total, Svr_SoccerRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'Svr_SoccerPending' Component, Svr_SoccerTotal as Total, Svr_SoccerPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'UXClosed' Component, UXTotal as Total, UXClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'UXResolved' Component, UXTotal as Total, UXResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'UXRejected' Component, UXTotal as Total, UXRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'UXPending' Component, UXTotal as Total, UXPending as COUNT from defects_infor_component_ap

union
select ProjectName, ModelCode, 'e_PopClosed' Component, e_PopTotal as Total, e_PopClosed as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'e_PopResolved' Component, e_PopTotal as Total, e_PopResolved as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'e_PopRejected' Component, e_PopTotal as Total, e_PopRejected as COUNT from defects_infor_component_ap
union
select ProjectName, ModelCode, 'e_PopPending' Component, e_PopTotal as Total, e_PopPending as COUNT from defects_infor_component_ap

 bp:

drop table if exists comp_bp;
create table comp_bp  as
select ProjectName, ModelCode, 'BP_AppClosed' Component, BP_AppTotal as Total, BP_AppClosed as COUNT from defects_infor_component_bp
union
select ProjectName, ModelCode, 'BP_AppResolved' Component, BP_AppTotal as Total, BP_AppResolved as COUNT from defects_infor_component_bp
union
select ProjectName, ModelCode, 'BP_AppRejected' Component, BP_AppTotal as Total, BP_AppRejected as COUNT from defects_infor_component_bp
union
select ProjectName, ModelCode, 'BP_AppPending' Component, BP_AppTotal as Total, BP_AppPending as COUNT from defects_infor_component_bp

union
select ProjectName, ModelCode, 'BP_AppNonSmartClosed' Component, BP_AppNonSmartTotal as Total, BP_AppNonSmartClosed as COUNT from defects_infor_component_bp
union
select ProjectName, ModelCode, 'BP_AppNonSmartResolved' Component, BP_AppNonSmartTotal as Total, BP_AppNonSmartResolved as COUNT from defects_infor_component_bp
union
select ProjectName, ModelCode, 'BP_AppNonSmartRejected' Component, BP_AppNonSmartTotal as Total, BP_AppNonSmartRejected as COUNT from defects_infor_component_bp
union
select ProjectName, ModelCode, 'BP_AppNonSmartPending' Component, BP_AppNonSmartTotal as Total, BP_AppNonSmartPending as COUNT from defects_infor_component_bp

union
select ProjectName, ModelCode, 'BP_AppFWClosed' Component, BP_AppFWTotal as Total, BP_AppFWClosed as COUNT from defects_infor_component_bp
union
select ProjectName, ModelCode, 'BP_AppFWResolved' Component, BP_AppFWTotal as Total, BP_AppFWResolved as COUNT from defects_infor_component_bp
union
select ProjectName, ModelCode, 'BP_AppFWRejected' Component, BP_AppFWTotal as Total, BP_AppFWRejected as COUNT from defects_infor_component_bp
union
select ProjectName, ModelCode, 'BP_AppFWPending' Component, BP_AppFWTotal as Total, BP_AppFWPending as COUNT from defects_infor_component_bp

union
select ProjectName, ModelCode, 'BP_CSPClosed' Component, BP_CSPTotal as Total, BP_CSPClosed as COUNT from defects_infor_component_bp
union
select ProjectName, ModelCode, 'BP_CSPResolved' Component, BP_CSPTotal as Total, BP_CSPResolved as COUNT from defects_infor_component_bp
union
select ProjectName, ModelCode, 'BP_CSPRejected' Component, BP_CSPTotal as Total, BP_CSPRejected as COUNT from defects_infor_component_bp
union
select ProjectName, ModelCode, 'BP_CSPPending' Component, BP_CSPTotal as Total, BP_CSPPending as COUNT from defects_infor_component_bp

union
select ProjectName, ModelCode, 'BP_CSPNonSmartClosed' Component, BP_CSPNonSmartTotal as Total, BP_CSPNonSmartClosed as COUNT from defects_infor_component_bp
union
select ProjectName, ModelCode, 'BP_CSPNonSmartResolved' Component, BP_CSPNonSmartTotal as Total, BP_CSPNonSmartResolved as COUNT from defects_infor_component_bp
union
select ProjectName, ModelCode, 'BP_CSPNonSmartRejected' Component, BP_CSPNonSmartTotal as Total, BP_CSPNonSmartRejected as COUNT from defects_infor_component_bp
union
select ProjectName, ModelCode, 'BP_CSPNonSmartPending' Component, BP_CSPNonSmartTotal as Total, BP_CSPNonSmartPending as COUNT from defects_infor_component_bp

union
select ProjectName, ModelCode, 'BP_GfxClosed' Component, BP_GfxTotal as Total, BP_GfxClosed as COUNT from defects_infor_component_bp
union
select ProjectName, ModelCode, 'BP_GfxResolved' Component, BP_GfxTotal as Total, BP_GfxResolved as COUNT from defects_infor_component_bp
union
select ProjectName, ModelCode, 'BP_GfxRejected' Component, BP_GfxTotal as Total, BP_GfxRejected as COUNT from defects_infor_component_bp
union
select ProjectName, ModelCode, 'BP_GfxPending' Component, BP_GfxTotal as Total, BP_GfxPending as COUNT from defects_infor_component_bp

union
select ProjectName, ModelCode, 'BP_GfxNonSmartClosed' Component, BP_GfxNonSmartTotal as Total, BP_GfxNonSmartClosed as COUNT from defects_infor_component_bp
union
select ProjectName, ModelCode, 'BP_GfxNonSmartResolved' Component, BP_GfxNonSmartTotal as Total, BP_GfxNonSmartResolved as COUNT from defects_infor_component_bp
union
select ProjectName, ModelCode, 'BP_GfxNonSmartRejected' Component, BP_GfxNonSmartTotal as Total, BP_GfxNonSmartRejected as COUNT from defects_infor_component_bp
union
select ProjectName, ModelCode, 'BP_GfxNonSmartPending' Component, BP_GfxNonSmartTotal as Total, BP_GfxNonSmartPending as COUNT from defects_infor_component_bp

union
select ProjectName, ModelCode, 'BP_HALClosed' Component, BP_HALTotal as Total, BP_HALClosed as COUNT from defects_infor_component_bp
union
select ProjectName, ModelCode, 'BP_HALResolved' Component, BP_HALTotal as Total, BP_HALResolved as COUNT from defects_infor_component_bp
union
select ProjectName, ModelCode, 'BP_HALRejected' Component, BP_HALTotal as Total, BP_HALRejected as COUNT from defects_infor_component_bp
union
select ProjectName, ModelCode, 'BP_HALPending' Component, BP_HALTotal as Total, BP_HALPending as COUNT from defects_infor_component_bp

union
select ProjectName, ModelCode, 'BP_HALNonSmartClosed' Component, BP_HALNonSmartTotal as Total, BP_HALNonSmartClosed as COUNT from defects_infor_component_bp
union
select ProjectName, ModelCode, 'BP_HALNonSmartResolved' Component, BP_HALNonSmartTotal as Total, BP_HALNonSmartResolved as COUNT from defects_infor_component_bp
union
select ProjectName, ModelCode, 'BP_HALNonSmartRejected' Component, BP_HALNonSmartTotal as Total, BP_HALNonSmartRejected as COUNT from defects_infor_component_bp
union
select ProjectName, ModelCode, 'BP_HALNonSmartPending' Component, BP_HALNonSmartTotal as Total, BP_HALNonSmartPending as COUNT from defects_infor_component_bp

union
select ProjectName, ModelCode, 'BP_JAVAMWTVNonSmartClosed' Component, BP_JAVAMWTVNonSmartTotal as Total, BP_JAVAMWTVNonSmartClosed as COUNT from defects_infor_component_bp
union
select ProjectName, ModelCode, 'BP_JAVAMWTVNonSmartResolved' Component, BP_JAVAMWTVNonSmartTotal as Total, BP_JAVAMWTVNonSmartResolved as COUNT from defects_infor_component_bp
union
select ProjectName, ModelCode, 'BP_JAVAMWTVNonSmartRejected' Component, BP_JAVAMWTVNonSmartTotal as Total, BP_JAVAMWTVNonSmartRejected as COUNT from defects_infor_component_bp
union
select ProjectName, ModelCode, 'BP_JAVAMWTVNonSmartPending' Component, BP_JAVAMWTVNonSmartTotal as Total, BP_JAVAMWTVNonSmartPending as COUNT from defects_infor_component_bp

union
select ProjectName, ModelCode, 'BP_JavaMWTVClosed' Component, BP_JavaMWTVTotal as Total, BP_JavaMWTVClosed as COUNT from defects_infor_component_bp
union
select ProjectName, ModelCode, 'BP_JavaMWTVResolved' Component, BP_JavaMWTVTotal as Total, BP_JavaMWTVResolved as COUNT from defects_infor_component_bp
union
select ProjectName, ModelCode, 'BP_JavaMWTVRejected' Component, BP_JavaMWTVTotal as Total, BP_JavaMWTVRejected as COUNT from defects_infor_component_bp
union
select ProjectName, ModelCode, 'BP_JavaMWTVPending' Component, BP_JavaMWTVTotal as Total, BP_JavaMWTVPending as COUNT from defects_infor_component_bp

union
select ProjectName, ModelCode, 'BP_MWClosed' Component, BP_MWTotal as Total, BP_MWClosed as COUNT from defects_infor_component_bp
union
select ProjectName, ModelCode, 'BP_MWResolved' Component, BP_MWTotal as Total, BP_MWResolved as COUNT from defects_infor_component_bp
union
select ProjectName, ModelCode, 'BP_MWRejected' Component, BP_MWTotal as Total, BP_MWRejected as COUNT from defects_infor_component_bp
union
select ProjectName, ModelCode, 'BP_MWPending' Component, BP_MWTotal as Total, BP_MWPending as COUNT from defects_infor_component_bp

union
select ProjectName, ModelCode, 'BP_MWNonSmartClosed' Component, BP_MWNonSmartTotal as Total, BP_MWNonSmartClosed as COUNT from defects_infor_component_bp
union
select ProjectName, ModelCode, 'BP_MWNonSmartResolved' Component, BP_MWNonSmartTotal as Total, BP_MWNonSmartResolved as COUNT from defects_infor_component_bp
union
select ProjectName, ModelCode, 'BP_MWNonSmartRejected' Component, BP_MWNonSmartTotal as Total, BP_MWNonSmartRejected as COUNT from defects_infor_component_bp
union
select ProjectName, ModelCode, 'BP_MWNonSmartPending' Component, BP_MWNonSmartTotal as Total, BP_MWNonSmartPending as COUNT from defects_infor_component_bp

 tp:

drop table if exists comp_tp;
create table comp_tp as
select ProjectName, ModelCode, 'TP_AppSolutionClosed' Component, TP_AppSolutionTotal as Total, TP_AppSolutionClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_AppSolutionResolved' Component,TP_AppSolutionTotal as Total,TP_AppSolutionResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_AppSolutionRejected' Component,TP_AppSolutionTotal as Total, TP_AppSolutionRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_AppSolutionPending' Component, TP_AppSolutionTotal as Total,TP_AppSolutionPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_ExternalAppsClosed' Component, TP_ExternalAppsTotal as Total,TP_ExternalAppsClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_ExternalAppsRejected' Component, TP_ExternalAppsTotal as Total,TP_ExternalAppsRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_ExternalAppsResolved' Component, TP_ExternalAppsTotal as Total,TP_ExternalAppsResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_ExternalAppsPending' Component, TP_ExternalAppsTotal as Total,TP_ExternalAppsPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_AppFWClosed' Component, TP_AppFWTotal as Total,TP_AppFWClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_AppFWResolved' Component,TP_AppFWTotal as Total,TP_AppFWResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_AppFWRejected' Component, TP_AppFWTotal as Total,TP_AppFWRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_AppFWPending' Component, TP_AppFWTotal as Total,TP_AppFWPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_BroadcastAppClosed' Component, TP_BroadcastAppTotal as Total,TP_BroadcastAppClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_BroadcastAppResolved' Component,TP_BroadcastAppTotal as Total,TP_BroadcastAppResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_BroadcastAppRejected' Component, TP_BroadcastAppTotal as Total,TP_BroadcastAppRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_BroadcastAppPending' Component, TP_BroadcastAppTotal as Total,TP_BroadcastAppPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_BroadcastMWClosed' Component, TP_BroadcastMWTotal as  Total,TP_BroadcastMWClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_BroadcastMWResolved' Component,TP_BroadcastMWTotal as  Total,TP_BroadcastMWResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_BroadcastMWRejected' Component, TP_BroadcastMWTotal as  Total,TP_BroadcastMWRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_BroadcastMWPending' Component, TP_BroadcastMWTotal as  Total,TP_BroadcastMWPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_CoreAppClosed' Component, TP_CoreAppTotal as Total,TP_CoreAppClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_CoreAppResolved' Component,TP_CoreAppTotal as Total,TP_CoreAppResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_CoreAppRejected' Component, TP_CoreAppTotal as Total,TP_CoreAppRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_CoreAppPending' Component, TP_CoreAppTotal as Total,TP_CoreAppPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_JavaMWTVClosed' Component, TP_JavaMWTVTotal as Total,TP_JavaMWTVClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_JavaMWTVResolved' Component, TP_JavaMWTVTotal as Total,TP_JavaMWTVResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_JavaMWTVRejected' Component, TP_JavaMWTVTotal as Total,TP_JavaMWTVRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_JavaMWTVPending' Component, TP_JavaMWTVTotal as Total,TP_JavaMWTVPending as COUNT from defects_infor_component_tp


union
select ProjectName, ModelCode, 'TP_SetupAppClosed' Component, TP_SetupAppTotal as Total,TP_SetupAppClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_SetupAppResolved' Component, TP_SetupAppTotal as Total,TP_SetupAppResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_SetupAppRejected' Component, TP_SetupAppTotal as Total,TP_SetupAppRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_SetupAppPending' Component, TP_SetupAppTotal as Total,TP_SetupAppPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_ACMClosed' Component, TP_ACMTotal as Total,TP_ACMClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_ACMResolved' Component, TP_ACMTotal as Total,TP_ACMResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_ACMRejected' Component,TP_ACMTotal as Total, TP_ACMRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_ACMPending' Component,TP_ACMTotal as Total, TP_ACMPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_ConnectedHomeClosed' Component, TP_ConnectedHomeTotal as Total,TP_ConnectedHomeClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_ConnectedHomeResolved' Component,TP_ConnectedHomeTotal as Total, TP_ConnectedHomeResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_ConnectedHomeRejected' Component,TP_ConnectedHomeTotal as Total, TP_ConnectedHomeRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_ConnectedHomePending' Component,TP_ConnectedHomeTotal as Total, TP_ConnectedHomePending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_ConnectivityAppClosed' Component,TP_ConnectivityAppTotal as Total, TP_ConnectivityAppClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_ConnectivityAppResolved' Component, TP_ConnectivityAppTotal as Total,TP_ConnectivityAppResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_ConnectivityAppRejected' Component, TP_ConnectivityAppTotal as Total,TP_ConnectivityAppRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_ConnectivityAppPending' Component, TP_ConnectivityAppTotal as Total,TP_ConnectivityAppPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_ConnectivityCoreClosed' Component,TP_ConnectivityCoreTotal as Total, TP_ConnectivityCoreClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_ConnectivityCoreResolved' Component, TP_ConnectivityCoreTotal as Total,TP_ConnectivityCoreResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_ConnectivityCoreRejected' Component, TP_ConnectivityCoreTotal as Total,TP_ConnectivityCoreRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_ConnectivityCorePending' Component, TP_ConnectivityCoreTotal as Total,TP_ConnectivityCorePending as COUNT from defects_infor_component_tp


union
select ProjectName, ModelCode, 'TP_ExternalSpeakerClosed' Component, TP_ExternalSpeakerTotal as Total,TP_ExternalSpeakerClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_ExternalSpeakerResolved' Component,TP_ExternalSpeakerTotal as Total, TP_ExternalSpeakerResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_ExternalSpeakerRejected' Component, TP_ExternalSpeakerTotal as Total,TP_ExternalSpeakerRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_ExternalSpeakerPending' Component,TP_ExternalSpeakerTotal as Total, TP_ExternalSpeakerPending as COUNT from defects_infor_component_tp


union
select ProjectName, ModelCode, 'TP_NetworkSpeakerClosed' Component, TP_NetworkSpeakerTotal as Total,TP_NetworkSpeakerClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_NetworkSpeakerResolved' Component,TP_NetworkSpeakerTotal as Total, TP_NetworkSpeakerResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_NetworkSpeakerRejected' Component,TP_NetworkSpeakerTotal as Total, TP_NetworkSpeakerRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_NetworkSpeakerPending' Component,TP_NetworkSpeakerTotal as Total, TP_NetworkSpeakerPending as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_RMClosed' Component, TP_RMTotal as Total,TP_RMClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_RMResolved' Component,TP_RMTotal as Total, TP_RMResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_RMRejected' Component,TP_RMTotal as Total, TP_RMRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_RMPending' Component,TP_RMTotal as Total, TP_RMPending as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_WebServerClosed' Component, TP_WebServerTotal as Total,TP_WebServerClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_WebServerResolved' Component,TP_WebServerTotal as Total, TP_WebServerResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_WebServerRejected' Component,TP_WebServerTotal as Total, TP_WebServerRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_WebServerPending' Component,TP_WebServerTotal as Total, TP_WebServerPending as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_ContentServiceClosed' Component,TP_ContentServiceTotal as Total, TP_ContentServiceClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_ContentServiceResolved' Component, TP_ContentServiceTotal as Total,TP_ContentServiceResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_ContentServiceRejected' Component, TP_ContentServiceTotal as Total,TP_ContentServiceRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_ContentServicePending' Component, TP_ContentServiceTotal as Total,TP_ContentServicePending as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_DLNAClosed' Component, TP_DLNATotal as Total,TP_DLNAClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_DLNAResolved' Component, TP_DLNATotal as Total,TP_DLNAResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_DLNARejected' Component,TP_DLNATotal as Total, TP_DLNARejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_DLNAPending' Component, TP_DLNATotal as Total,TP_DLNAPending as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_DualTVClosed' Component, TP_DualTVTotal as Total,TP_DualTVClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_DualTVResolved' Component, TP_DualTVTotal as Total,TP_DualTVResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_DualTVRejected' Component, TP_DualTVTotal as Total,TP_DualTVRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_DualTVPending' Component, TP_DualTVTotal as Total,TP_DualTVPending as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_RemoteClosed' Component, TP_RemoteTotal as Total,TP_RemoteClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_RemoteResolved' Component, TP_RemoteTotal as Total,TP_RemoteResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_RemoteRejected' Component, TP_RemoteTotal as Total,TP_RemoteRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_RemotePending' Component, TP_RemoteTotal as Total,TP_RemotePending as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_PlatformCommonClosed' Component, TP_PlatformCommonTotal as Total,TP_PlatformCommonClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_PlatformCommonResolved' Component, TP_PlatformCommonTotal as Total,TP_PlatformCommonResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_PlatformCommonRejected' Component, TP_PlatformCommonTotal as Total,TP_PlatformCommonRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_PlatformCommonPending' Component, TP_PlatformCommonTotal as Total,TP_PlatformCommonPending as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_MVPDClosed' Component, TP_MVPDTotal as Total,TP_MVPDClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_MVPDResolved' Component, TP_MVPDTotal as Total,TP_MVPDResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_MVPDRejected' Component,TP_MVPDTotal as Total, TP_MVPDRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_MVPDPending' Component, TP_MVPDTotal as Total,TP_MVPDPending as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_PVODClosed' Component, TP_PVODTotal as Total,TP_PVODClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_PVODResolved' Component,TP_PVODTotal as Total, TP_PVODResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_PVODRejected' Component,TP_PVODTotal as Total, TP_PVODRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_PVODPending' Component, TP_PVODTotal as Total,TP_PVODPending as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_EnterprisePlatformClosed' Component, TP_EnterprisePlatformTotal as Total,TP_EnterprisePlatformClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_EnterprisePlatformResolved' Component, TP_EnterprisePlatformTotal as Total,TP_EnterprisePlatformResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_EnterprisePlatformRejected' Component, TP_EnterprisePlatformTotal as Total,TP_EnterprisePlatformRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_EnterprisePlatformPending' Component, TP_EnterprisePlatformTotal as Total,TP_EnterprisePlatformPending as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'App_MobileClosed' Component,App_MobileTotal as Total, App_MobileClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'App_MobileResolved' Component, App_MobileTotal as Total,App_MobileResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'App_MobileRejected' Component, App_MobileTotal as Total,App_MobileRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'App_MobilePending' Component,App_MobileTotal as Total, App_MobilePending as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_SocialPanelClosed' Component, TP_SocialPanelTotal as Total,TP_SocialPanelClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_SocialPanelResolved' Component, TP_SocialPanelTotal as Total,TP_SocialPanelResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_SocialPanelRejected' Component,TP_SocialPanelTotal as Total, TP_SocialPanelRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_SocialPanelPending' Component, TP_SocialPanelTotal as Total,TP_SocialPanelPending as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'eManual_TizenClosed' Component,eManual_TizenTotal as Total, eManual_TizenClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'eManual_TizenResolved' Component, eManual_TizenTotal as Total,eManual_TizenResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'eManual_TizenRejected' Component, eManual_TizenTotal as Total,eManual_TizenRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'eManual_TizenPending' Component, eManual_TizenTotal as Total,eManual_TizenPending as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_GplayerClosed' Component, TP_GplayerTotal as Total,TP_GplayerClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_GplayerResolved' Component,TP_GplayerTotal as Total, TP_GplayerResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_GplayerRejected' Component, TP_GplayerTotal as Total,TP_GplayerRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_GplayerPending' Component,TP_GplayerTotal as Total, TP_GplayerPending as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_CameraFWClosed' Component, TP_CameraFWTotal as Total,TP_CameraFWClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_CameraFWResolved' Component, TP_CameraFWTotal as Total,TP_CameraFWResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_CameraFWRejected' Component,TP_CameraFWTotal as Total, TP_CameraFWRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_CameraFWPending' Component, TP_CameraFWTotal as Total,TP_CameraFWPending as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_CameraTVClosed' Component, TP_CameraTVTotal as Total,TP_CameraTVClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_CameraTVResolved' Component, TP_CameraTVTotal as Total,TP_CameraTVResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_CameraTVRejected' Component,TP_CameraTVTotal as Total, TP_CameraTVRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_CameraTVPending' Component, TP_CameraTVTotal as Total,TP_CameraTVPending as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_ContentsAnalysisClosed' Component, TP_ContentsAnalysisTotal as Total,TP_ContentsAnalysisClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_ContentsAnalysisResolved' Component,TP_ContentsAnalysisTotal as Total, TP_ContentsAnalysisResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_ContentsAnalysisRejected' Component,TP_ContentsAnalysisTotal as Total, TP_ContentsAnalysisRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_ContentsAnalysisPending' Component,TP_ContentsAnalysisTotal as Total, TP_ContentsAnalysisPending as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_DialogEngineClosed' Component, TP_DialogEngineTotal as Total,TP_DialogEngineClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_DialogEngineResolved' Component, TP_DialogEngineTotal as Total,TP_DialogEngineResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_DialogEngineRejected' Component, TP_DialogEngineTotal as Total,TP_DialogEngineRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_DialogEnginePending' Component, TP_DialogEngineTotal as Total,TP_DialogEnginePending as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_EnhancedFeaturesClosed' Component,TP_EnhancedFeaturesTotal as Total, TP_EnhancedFeaturesClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_EnhancedFeaturesResolved' Component, TP_EnhancedFeaturesTotal as Total,TP_EnhancedFeaturesResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_EnhancedFeaturesRejected' Component,TP_EnhancedFeaturesTotal as Total, TP_EnhancedFeaturesRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_EnhancedFeaturesPending' Component, TP_EnhancedFeaturesTotal as Total,TP_EnhancedFeaturesPending as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_FTVClosed' Component, TP_FTVTotal as Total,TP_FTVClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_FTVResolved' Component,TP_FTVTotal as Total, TP_FTVResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_FTVRejected' Component,TP_FTVTotal as Total, TP_FTVRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_FTVPending' Component,TP_FTVTotal as Total,TP_FTVPending as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_HdmiCecClosed' Component, TP_HdmiCecTotal as Total,TP_HdmiCecClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_HdmiCecResolved' Component,TP_HdmiCecTotal as Total, TP_HdmiCecResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_HdmiCecRejected' Component, TP_HdmiCecTotal as Total,TP_HdmiCecRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_HdmiCecPending' Component,TP_HdmiCecTotal as Total, TP_HdmiCecPending as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_InfoObjetClosed' Component,TP_InfoObjetTotal as Total, TP_InfoObjetClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_InfoObjetResolved' Component, TP_InfoObjetTotal as Total,TP_InfoObjetResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_InfoObjetRejected' Component, TP_InfoObjetTotal as Total,TP_InfoObjetRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_InfoObjetPending' Component, TP_InfoObjetTotal as Total,TP_InfoObjetPending as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_MorningBriefClosed' Component, TP_MorningBriefTotal as Total,TP_MorningBriefClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_MorningBriefResolved' Component, TP_MorningBriefTotal as Total,TP_MorningBriefResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_MorningBriefRejected' Component, TP_MorningBriefTotal as Total,TP_MorningBriefRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_MorningBriefPending' Component,TP_MorningBriefTotal as Total, TP_MorningBriefPending as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_RecogEngineMWClosed' Component,TP_RecogEngineMWTotal as Total, TP_RecogEngineMWClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_RecogEngineMWResolved' Component,TP_RecogEngineMWTotal as Total, TP_RecogEngineMWResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_RecogEngineMWRejected' Component, TP_RecogEngineMWTotal as Total,TP_RecogEngineMWRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_RecogEngineMWPending' Component,TP_RecogEngineMWTotal as Total, TP_RecogEngineMWPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_RecognitionClosed' Component,TP_RecognitionTotal as Total, TP_RecognitionClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_RecognitionResolved' Component,TP_RecognitionTotal as Total, TP_RecognitionResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_RecognitionRejected' Component,TP_RecognitionTotal as Total, TP_RecognitionRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_RecognitionPending' Component, TP_RecognitionTotal as Total,TP_RecognitionPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_BdPlatformClosed' Component,TP_BdPlatformTotal as Total, TP_BdPlatformClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_BdPlatformResolved' Component, TP_BdPlatformTotal as Total,TP_BdPlatformResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_BdPlatformRejected' Component,TP_BdPlatformTotal as Total, TP_BdPlatformRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_BdPlatformPending' Component, TP_BdPlatformTotal as Total,TP_BdPlatformPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_BdplayerClosed' Component, TP_BdplayerTotal as Total,TP_BdplayerClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_BdplayerResolved' Component,TP_BdplayerTotal as Total, TP_BdplayerResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_BdplayerRejected' Component,TP_BdplayerTotal as Total, TP_BdplayerRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_BdplayerPending' Component, TP_BdplayerTotal as Total,TP_BdplayerPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_CMEMPClosed' Component, TP_CMEMPTotal as Total,TP_CMEMPClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_CMEMPResolved' Component, TP_CMEMPTotal as Total,TP_CMEMPResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_CMEMPRejected' Component, TP_CMEMPTotal as Total,TP_CMEMPRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_CMEMPPending' Component, TP_CMEMPTotal as Total,TP_CMEMPPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_CSFClosed' Component, TP_CSFTotal as Total,TP_CSFClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_CSFResolved' Component,TP_CSFTotal as Total, TP_CSFResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_CSFRejected' Component, TP_CSFTotal as Total,TP_CSFRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_CSFPending' Component,TP_CSFTotal as Total, TP_CSFPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_MMAppClosed' Component, TP_MMAppTotal as Total,TP_MMAppClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_MMAppResolved' Component,TP_MMAppTotal as Total, TP_MMAppResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_MMAppRejected' Component, TP_MMAppTotal as Total,TP_MMAppRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_MMAppPending' Component,TP_MMAppTotal as Total, TP_MMAppPending as COUNT from defects_infor_component_tp


union
select ProjectName, ModelCode, 'TP_MMAudioClosed' Component,TP_MMAudioTotal as Total, TP_MMAudioClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_MMAudioResolved' Component,TP_MMAudioTotal as Total, TP_MMAudioResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_MMAudioRejected' Component,TP_MMAudioTotal as Total, TP_MMAudioRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_MMAudioPending' Component, TP_MMAudioTotal as Total,TP_MMAudioPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_MMCameraClosed' Component,TP_MMCameraTotal as Total, TP_MMCameraClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_MMCameraResolved' Component, TP_MMCameraTotal as Total,TP_MMCameraResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_MMCameraRejected' Component,TP_MMCameraTotal as Total, TP_MMCameraRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_MMCameraPending' Component, TP_MMCameraTotal as Total,TP_MMCameraPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_MMMediaContentClosed' Component,TP_MMMediaContentTotal as Total, TP_MMMediaContentClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_MMMediaContentResolved' Component,TP_MMMediaContentTotal as Total, TP_MMMediaContentResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_MMMediaContentRejected' Component,TP_MMMediaContentTotal as Total, TP_MMMediaContentRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_MMMediaContentPending' Component, TP_MMMediaContentTotal as Total,TP_MMMediaContentPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_MMPlayerClosed' Component,TP_MMPlayerTotal as Total, TP_MMPlayerClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_MMPlayerResolved' Component, TP_MMPlayerTotal as Total,TP_MMPlayerResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_MMPlayerRejected' Component, TP_MMPlayerTotal as Total,TP_MMPlayerRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_MMPlayerPending' Component, TP_MMPlayerTotal as Total,TP_MMPlayerPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_MultimediaMWClosed' Component,TP_MultimediaMWTotal as Total, TP_MultimediaMWClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_MultimediaMWResolved' Component, TP_MultimediaMWTotal as Total,TP_MultimediaMWResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_MultimediaMWRejected' Component,TP_MultimediaMWTotal as Total, TP_MultimediaMWRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_MultimediaMWPending' Component, TP_MultimediaMWTotal as Total,TP_MultimediaMWPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_OnScreenUIClosed' Component, TP_OnScreenUITotal as Total,TP_OnScreenUIClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_OnScreenUIResolved' Component, TP_OnScreenUITotal as Total,TP_OnScreenUIResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_OnScreenUIRejected' Component, TP_OnScreenUITotal as Total,TP_OnScreenUIRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_OnScreenUIPending' Component,TP_OnScreenUITotal as Total, TP_OnScreenUIPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_PXClosed' Component, TP_PXTotal as Total,TP_PXClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_PXResolved' Component,TP_PXTotal as Total, TP_PXResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_PXRejected' Component,TP_PXTotal as Total, TP_PXRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_PXPending' Component, TP_PXTotal as Total,TP_PXPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_CrossPlatformClosed' Component, TP_CrossPlatformTotal as Total,TP_CrossPlatformClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_CrossPlatformResolved' Component, TP_CrossPlatformTotal as Total,TP_CrossPlatformResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_CrossPlatformRejected' Component, TP_CrossPlatformTotal as Total,TP_CrossPlatformRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_CrossPlatformPending' Component, TP_CrossPlatformTotal as Total,TP_CrossPlatformPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_SDKClosed' Component, TP_SDKTotal as Total,TP_SDKClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_SDKResolved' Component, TP_SDKTotal as Total,TP_SDKResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_SDKRejected' Component, TP_SDKTotal as Total,TP_SDKRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_SDKPending' Component, TP_SDKTotal as Total,TP_SDKPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_SecurityClosed' Component, TP_SecurityTotal as Total,TP_SecurityClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_SecurityResolved' Component, TP_SecurityTotal as Total,TP_SecurityResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_SecurityRejected' Component, TP_SecurityTotal as Total,TP_SecurityRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_SecurityPending' Component, TP_SecurityTotal as Total,TP_SecurityPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_ADAgentClosed' Component, TP_ADAgentTotal as Total,TP_ADAgentClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_ADAgentResolved' Component, TP_ADAgentTotal as Total,TP_ADAgentResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_ADAgentRejected' Component, TP_ADAgentTotal as Total,TP_ADAgentRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_ADAgentPending' Component, TP_ADAgentTotal as Total,TP_ADAgentPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_AppStoreClosed' Component, TP_AppStoreTotal as Total,TP_AppStoreClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_AppStoreResolved' Component, TP_AppStoreTotal as Total,TP_AppStoreResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_AppStoreRejected' Component, TP_AppStoreTotal as Total,TP_AppStoreRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_AppStorePending' Component,TP_AppStoreTotal as Total, TP_AppStorePending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_BillingClosed' Component,TP_BillingTotal as Total, TP_BillingClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_BillingResolved' Component, TP_BillingTotal as Total,TP_BillingResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_BillingRejected' Component, TP_BillingTotal as Total,TP_BillingRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_BillingPending' Component, TP_BillingTotal as Total,TP_BillingPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_ClipsClosed' Component, TP_ClipsTotal as Total,TP_ClipsClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_ClipsResolved' Component, TP_ClipsTotal as Total,TP_ClipsResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_ClipsRejected' Component, TP_ClipsTotal as Total,TP_ClipsRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_ClipsPending' Component, TP_ClipsTotal as Total,TP_ClipsPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_ESPClosed' Component, TP_ESPTotal as Total,TP_ESPClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_ESPResolved' Component, TP_ESPTotal as Total,TP_ESPResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_ESPRejected' Component, TP_ESPTotal as Total,TP_ESPRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_ESPPending' Component, TP_ESPTotal as Total,TP_ESPPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_EXTRA_KRClosed' Component, TP_EXTRA_KRTotal as Total,TP_EXTRA_KRClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_EXTRA_KRResolved' Component, TP_EXTRA_KRTotal as Total,TP_EXTRA_KRResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_EXTRA_KRRejected' Component,TP_EXTRA_KRTotal as Total, TP_EXTRA_KRRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_EXTRA_KRPending' Component, TP_EXTRA_KRTotal as Total,TP_EXTRA_KRPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_GameFrontClosed' Component,TP_GameFrontTotal as Total, TP_GameFrontClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_GameFrontResolved' Component, TP_GameFrontTotal as Total,TP_GameFrontResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_GameFrontRejected' Component,TP_GameFrontTotal as Total, TP_GameFrontRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_GameFrontPending' Component, TP_GameFrontTotal as Total,TP_GameFrontPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_MyContentsClosed' Component,TP_MyContentsTotal as Total, TP_MyContentsClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_MyContentsResolved' Component, TP_MyContentsTotal as Total,TP_MyContentsResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_MyContentsRejected' Component,TP_MyContentsTotal as Total, TP_MyContentsRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_MyContentsPending' Component,TP_MyContentsTotal as Total, TP_MyContentsPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_NewsOnClosed' Component, TP_NewsOnTotal as Total,TP_NewsOnClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_NewsOnResolved' Component, TP_NewsOnTotal as Total,TP_NewsOnResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_NewsOnRejected' Component,TP_NewsOnTotal as Total, TP_NewsOnRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_NewsOnPending' Component,TP_NewsOnTotal as Total, TP_NewsOnPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_NotiCenterClosed' Component,TP_NotiCenterTotal as Total, TP_NotiCenterClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_NotiCenterResolved' Component,TP_NotiCenterTotal as Total, TP_NotiCenterResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_NotiCenterRejected' Component,TP_NotiCenterTotal as Total, TP_NotiCenterRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_NotiCenterPending' Component, TP_NotiCenterTotal as Total,TP_NotiCenterPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_OnTVClosed' Component, TP_OnTVTotal as Total,TP_OnTVClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_OnTVResolved' Component, TP_OnTVTotal as Total,TP_OnTVResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_OnTVRejected' Component, TP_OnTVTotal as Total,TP_OnTVRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_OnTVPending' Component, TP_OnTVTotal as Total,TP_OnTVPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_SAFClosed' Component, TP_SAFTotal as Total,TP_SAFClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_SAFResolved' Component, TP_SAFTotal as Total,TP_SAFResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_SAFRejected' Component,TP_SAFTotal as Total, TP_SAFRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_SAFPending' Component,TP_SAFTotal as Total, TP_SAFPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_SSOClosed' Component, TP_SSOTotal as Total,TP_SSOClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_SSOResolved' Component, TP_SSOTotal as Total,TP_SSOResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_SSORejected' Component,TP_SSOTotal as Total, TP_SSORejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_SSOPending' Component,TP_SSOTotal as Total, TP_SSOPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_SearchAllClosed' Component, TP_SearchAllTotal as Total,TP_SearchAllClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_SearchAllResolved' Component, TP_SearchAllTotal as Total,TP_SearchAllResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_SearchAllRejected' Component,TP_SearchAllTotal as Total, TP_SearchAllRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_SearchAllPending' Component, TP_SearchAllTotal as Total,TP_SearchAllPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_SoccerClosed' Component,TP_SoccerTotal as Total, TP_SoccerClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_SoccerResolved' Component,TP_SoccerTotal as Total, TP_SoccerResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_SoccerRejected' Component, TP_SoccerTotal as Total,TP_SoccerRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_SoccerPending' Component,TP_SoccerTotal as Total, TP_SoccerPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_TVPlusClosed' Component,TP_TVPlusTotal as Total, TP_TVPlusClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_TVPlusResolved' Component,TP_TVPlusTotal as Total, TP_TVPlusResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_TVPlusRejected' Component, TP_TVPlusTotal as Total,TP_TVPlusRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_TVPlusPending' Component, TP_TVPlusTotal as Total,TP_TVPlusPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_SOCClosed' Component, TP_SOCTotal as Total,TP_SOCClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_SOCResolved' Component,TP_SOCTotal as Total, TP_SOCResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_SOCRejected' Component,TP_SOCTotal as Total, TP_SOCRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_SOCPending' Component, TP_SOCTotal as Total,TP_SOCPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_SOC_VENDORClosed' Component, TP_SOC_VENDORTotal as Total,TP_SOC_VENDORClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_SOC_VENDORResolved' Component, TP_SOC_VENDORTotal as Total,TP_SOC_VENDORResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_SOC_VENDORRejected' Component, TP_SOC_VENDORTotal as Total,TP_SOC_VENDORRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_SOC_VENDORPending' Component,TP_SOC_VENDORTotal as Total, TP_SOC_VENDORPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_SystemArchitectureClosed' Component, TP_SystemArchitectureTotal as Total,TP_SystemArchitectureClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_SystemArchitectureResolved' Component, TP_SystemArchitectureTotal as Total,TP_SystemArchitectureResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_SystemArchitectureRejected' Component, TP_SystemArchitectureTotal as Total,TP_SystemArchitectureRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_SystemArchitecturePending' Component,TP_SystemArchitectureTotal as Total, TP_SystemArchitecturePending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_SystemPlatformClosed' Component,TP_SystemPlatformTotal as Total, TP_SystemPlatformClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_SystemPlatformResolved' Component,TP_SystemPlatformTotal as Total, TP_SystemPlatformResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_SystemPlatformRejected' Component,TP_SystemPlatformTotal as Total, TP_SystemPlatformRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_SystemPlatformPending' Component, TP_SystemPlatformTotal as Total,TP_SystemPlatformPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'AT_HUB_TizenClosed' Component, AT_HUB_TizenTotal as Total,AT_HUB_TizenClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'AT_HUB_TizenResolved' Component, AT_HUB_TizenTotal as Total,AT_HUB_TizenResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'AT_HUB_TizenRejected' Component, AT_HUB_TizenTotal as Total,AT_HUB_TizenRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'AT_HUB_TizenPending' Component,AT_HUB_TizenTotal as Total, AT_HUB_TizenPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_AVSystemMWClosed' Component,TP_AVSystemMWTotal as Total, TP_AVSystemMWClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_AVSystemMWResolved' Component, TP_AVSystemMWTotal as Total,TP_AVSystemMWResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_AVSystemMWRejected' Component, TP_AVSystemMWTotal as Total,TP_AVSystemMWRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_AVSystemMWPending' Component, TP_AVSystemMWTotal as Total,TP_AVSystemMWPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_BootServiceClosed' Component,TP_BootServiceTotal as Total, TP_BootServiceClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_BootServiceResolved' Component,TP_BootServiceTotal as Total, TP_BootServiceResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_BootServiceRejected' Component,TP_BootServiceTotal as Total, TP_BootServiceRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_BootServicePending' Component,TP_BootServiceTotal as Total, TP_BootServicePending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_BootService_avClosed' Component, TP_BootService_avTotal as Total,TP_BootService_avClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_BootService_avResolved' Component, TP_BootService_avTotal as Total,TP_BootService_avResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_BootService_avRejected' Component, TP_BootService_avTotal as Total,TP_BootService_avRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_BootService_avPending' Component, TP_BootService_avTotal as Total,TP_BootService_avPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_ContentsDownloadClosed' Component,TP_ContentsDownloadTotal as Total, TP_ContentsDownloadClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_ContentsDownloadResolved' Component,TP_ContentsDownloadTotal as Total, TP_ContentsDownloadResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_ContentsDownloadRejected' Component, TP_ContentsDownloadTotal as Total,TP_ContentsDownloadRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_ContentsDownloadPending' Component,TP_ContentsDownloadTotal as Total, TP_ContentsDownloadPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_SWUpgradeClosed' Component, TP_SWUpgradeTotal as Total,TP_SWUpgradeClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_SWUpgradeResolved' Component,TP_SWUpgradeTotal as Total, TP_SWUpgradeResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_SWUpgradeRejected' Component, TP_SWUpgradeTotal as Total,TP_SWUpgradeRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_SWUpgradePending' Component, TP_SWUpgradeTotal as Total,TP_SWUpgradePending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_SystemMWClosed' Component, TP_SystemMWTotal as Total,TP_SystemMWClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_SystemMWResolved' Component,TP_SystemMWTotal as Total, TP_SystemMWResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_SystemMWRejected' Component, TP_SystemMWTotal as Total,TP_SystemMWRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_SystemMWPending' Component,TP_SystemMWTotal as Total, TP_SystemMWPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'e_Pop_TizenClosed' Component, e_Pop_TizenTotal as Total,e_Pop_TizenClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'e_Pop_TizenResolved' Component,e_Pop_TizenTotal as Total, e_Pop_TizenResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'e_Pop_TizenRejected' Component, e_Pop_TizenTotal as Total,e_Pop_TizenRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'e_Pop_TizenPending' Component,e_Pop_TizenTotal as Total, e_Pop_TizenPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_PlatformTestClosed' Component, TP_PlatformTestTotal as Total,TP_PlatformTestClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_PlatformTestResolved' Component, TP_PlatformTestTotal as Total,TP_PlatformTestResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_PlatformTestRejected' Component,TP_PlatformTestTotal as Total, TP_PlatformTestRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_PlatformTestPending' Component,TP_PlatformTestTotal as Total, TP_PlatformTestPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TestAutomation_TizenClosed' Component, TestAutomation_TizenTotal as Total,TestAutomation_TizenClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TestAutomation_TizenResolved' Component, TestAutomation_TizenTotal as Total,TestAutomation_TizenResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TestAutomation_TizenRejected' Component,TestAutomation_TizenTotal as Total, TestAutomation_TizenRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TestAutomation_TizenPending' Component, TestAutomation_TizenTotal as Total,TestAutomation_TizenPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_UIFWClosed' Component, TP_UIFWTotal  as Total,TP_UIFWClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_UIFWResolved' Component,TP_UIFWTotal  as Total, TP_UIFWResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_UIFWRejected' Component,TP_UIFWTotal  as Total, TP_UIFWRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_UIFWPending' Component,TP_UIFWTotal  as Total, TP_UIFWPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_CSPClosed' Component, TP_CSPTotal as Total,TP_CSPClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_CSPResolved' Component, TP_CSPTotal as Total,TP_CSPResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_CSPRejected' Component, TP_CSPTotal as Total,TP_CSPRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_CSPPending' Component, TP_CSPTotal as Total,TP_CSPPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_OpenSourceClosed' Component, TP_OpenSourceTotal as Total,TP_OpenSourceClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_OpenSourceResolved' Component, TP_OpenSourceTotal as Total,TP_OpenSourceResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_OpenSourceRejected' Component, TP_OpenSourceTotal as Total,TP_OpenSourceRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_OpenSourcePending' Component, TP_OpenSourceTotal as Total,TP_OpenSourcePending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_VDLinuxClosed' Component, TP_VDLinuxTotal as Total,TP_VDLinuxClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_VDLinuxResolved' Component, TP_VDLinuxTotal as Total,TP_VDLinuxResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_VDLinuxRejected' Component,TP_VDLinuxTotal as Total, TP_VDLinuxRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_VDLinuxPending' Component, TP_VDLinuxTotal as Total,TP_VDLinuxPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_FirstScreenClosed' Component, TP_FirstScreenTotal as Total,TP_FirstScreenClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_FirstScreenResolved' Component, TP_FirstScreenTotal as Total,TP_FirstScreenResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_FirstScreenRejected' Component, TP_FirstScreenTotal as Total,TP_FirstScreenRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_FirstScreenPending' Component,TP_FirstScreenTotal as Total, TP_FirstScreenPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_VOLTClosed' Component, TP_VOLTTotal as Total,TP_VOLTClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_VOLTResolved' Component,TP_VOLTTotal as Total, TP_VOLTResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_VOLTRejected' Component,TP_VOLTTotal as Total, TP_VOLTRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_VOLTPending' Component,TP_VOLTTotal as Total, TP_VOLTPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_CBREClosed' Component,TP_CBRETotal as Total, TP_CBREClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_CBREResolved' Component,TP_CBRETotal as Total, TP_CBREResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_CBRERejected' Component,TP_CBRETotal as Total, TP_CBRERejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_CBREPending' Component,TP_CBRETotal as Total, TP_CBREPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_GingaNCLClosed' Component,TP_GingaNCLTotal as Total, TP_GingaNCLClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_GingaNCLResolved' Component,TP_GingaNCLTotal as Total, TP_GingaNCLResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_GingaNCLRejected' Component, TP_GingaNCLTotal as Total,TP_GingaNCLRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_GingaNCLPending' Component, TP_GingaNCLTotal as Total,TP_GingaNCLPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_HbbTVClosed' Component,TP_HbbTVTotal as Total, TP_HbbTVClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_HbbTVResolved' Component,TP_HbbTVTotal as Total, TP_HbbTVResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_HbbTVRejected' Component,TP_HbbTVTotal as Total, TP_HbbTVRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_HbbTVPending' Component,TP_HbbTVTotal as Total, TP_HbbTVPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_InfoLinkClosed' Component, TP_InfoLinkTotal as Total,TP_InfoLinkClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_InfoLinkResolved' Component, TP_InfoLinkTotal as Total,TP_InfoLinkResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_InfoLinkRejected' Component,TP_InfoLinkTotal as Total, TP_InfoLinkRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_InfoLinkPending' Component, TP_InfoLinkTotal as Total,TP_InfoLinkPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_TogetherPlayClosed' Component,TP_TogetherPlayTotal as Total, TP_TogetherPlayClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_TogetherPlayResolved' Component, TP_TogetherPlayTotal as Total,TP_TogetherPlayResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_TogetherPlayRejected' Component,TP_TogetherPlayTotal as Total, TP_TogetherPlayRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_TogetherPlayPending' Component, TP_TogetherPlayTotal as Total,TP_TogetherPlayPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_WebAppCoreClosed' Component, TP_WebAppCoreTotal as Total,TP_WebAppCoreClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_WebAppCoreResolved' Component, TP_WebAppCoreTotal as Total,TP_WebAppCoreResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_WebAppCoreRejected' Component, TP_WebAppCoreTotal as Total,TP_WebAppCoreRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_WebAppCorePending' Component, TP_WebAppCoreTotal as Total,TP_WebAppCorePending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_WebBrowserClosed' Component,TP_WebBrowserTotal as Total, TP_WebBrowserClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_WebBrowserResolved' Component, TP_WebBrowserTotal as Total,TP_WebBrowserResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_WebBrowserRejected' Component, TP_WebBrowserTotal as Total,TP_WebBrowserRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_WebBrowserPending' Component,TP_WebBrowserTotal as Total, TP_WebBrowserPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_WebEngineClosed' Component, TP_WebEngineTotal as Total,TP_WebEngineClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_WebEngineResolved' Component,TP_WebEngineTotal as Total, TP_WebEngineResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_WebEngineRejected' Component, TP_WebEngineTotal as Total,TP_WebEngineRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_WebEnginePending' Component,TP_WebEngineTotal as Total, TP_WebEnginePending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_WebUIFrameworkClosed' Component,TP_WebUIFrameworkTotal as Total, TP_WebUIFrameworkClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_WebUIFrameworkResolved' Component, TP_WebUIFrameworkTotal as Total,TP_WebUIFrameworkResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_WebUIFrameworkRejected' Component, TP_WebUIFrameworkTotal as Total,TP_WebUIFrameworkRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_WebUIFrameworkPending' Component,TP_WebUIFrameworkTotal as Total, TP_WebUIFrameworkPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_DisplayAudio_AppClosed' Component,TP_DisplayAudio_AppTotal as Total, TP_DisplayAudio_AppClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_DisplayAudio_AppResolved' Component, TP_DisplayAudio_AppTotal as Total,TP_DisplayAudio_AppResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_DisplayAudio_AppRejected' Component, TP_DisplayAudio_AppTotal as Total,TP_DisplayAudio_AppRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_DisplayAudio_AppPending' Component,TP_DisplayAudio_AppTotal as Total, TP_DisplayAudio_AppPending as COUNT from defects_infor_component_tp

union
select ProjectName, ModelCode, 'TP_WirelessAudioPlatformClosed' Component, TP_WirelessAudioPlatformTotal as Total,TP_WirelessAudioPlatformClosed as COUNT from defects_infor_component_tp
union 
select ProjectName, ModelCode, 'TP_WirelessAudioPlatformResolved' Component,TP_WirelessAudioPlatformTotal as Total, TP_WirelessAudioPlatformResolved as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_WirelessAudioPlatformRejected' Component, TP_WirelessAudioPlatformTotal as Total,TP_WirelessAudioPlatformRejected as COUNT from defects_infor_component_tp
union
select ProjectName, ModelCode, 'TP_WirelessAudioPlatformPending' Component, TP_WirelessAudioPlatformTotal as Total,TP_WirelessAudioPlatformPending as COUNT from defects_infor_component_tp

 etc:

drop table if exists comp_etc;
create table comp_etc  as
select ProjectName, ModelCode, 'AP_AppLiteClosed' Component, AP_AppLiteTotal as Total, AP_AppLiteClosed as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'AP_AppLiteResolved' Component, AP_AppLiteTotal as Total, AP_AppLiteResolved as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'AP_AppLiteRejected' Component, AP_AppLiteTotal as Total, AP_AppLiteRejected as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'AP_AppLitePending' Component, AP_AppLiteTotal as Total, AP_AppLitePending as COUNT from defects_infor_component_etc

union
select ProjectName, ModelCode, 'AV_ExternalClosed' Component, AV_ExternalTotal as Total, AV_ExternalClosed as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'AV_ExternalResolved' Component, AV_ExternalTotal as Total, AV_ExternalResolved as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'AV_ExternalRejected' Component, AV_ExternalTotal as Total, AV_ExternalRejected as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'AV_ExternalPending' Component, AV_ExternalTotal as Total, AV_ExternalPending as COUNT from defects_infor_component_etc

union
select ProjectName, ModelCode, 'CI_ReleaseSystemClosed' Component, CI_ReleaseSystemTotal as Total, CI_ReleaseSystemClosed as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'CI_ReleaseSystemResolved' Component, CI_ReleaseSystemTotal as Total, CI_ReleaseSystemResolved as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'CI_ReleaseSystemRejected' Component, CI_ReleaseSystemTotal as Total, CI_ReleaseSystemRejected as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'CI_ReleaseSystemPending' Component, CI_ReleaseSystemTotal as Total, CI_ReleaseSystemPending as COUNT from defects_infor_component_etc

union
select ProjectName, ModelCode, 'CI_TestAutomationClosed' Component, CI_TestAutomationTotal as Total, CI_TestAutomationClosed as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'CI_TestAutomationResolved' Component, CI_TestAutomationTotal as Total, CI_TestAutomationResolved as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'CI_TestAutomationRejected' Component, CI_TestAutomationTotal as Total, CI_TestAutomationRejected as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'CI_TestAutomationPending' Component, CI_TestAutomationTotal as Total, CI_TestAutomationPending as COUNT from defects_infor_component_etc

union
select ProjectName, ModelCode, 'EP_AppClosed' Component, EP_AppTotal as Total, EP_AppClosed as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'EP_AppResolved' Component, EP_AppTotal as Total, EP_AppResolved as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'EP_AppRejected' Component, EP_AppTotal as Total, EP_AppRejected as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'EP_AppPending' Component, EP_AppTotal as Total, EP_AppPending as COUNT from defects_infor_component_etc

union
select ProjectName, ModelCode, 'EP_IWBClosed' Component, EP_IWBTotal as Total, EP_IWBClosed as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'EP_IWBResolved' Component, EP_IWBTotal as Total, EP_IWBResolved as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'EP_IWBRejected' Component, EP_IWBTotal as Total, EP_IWBRejected as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'EP_IWBPending' Component, EP_IWBTotal as Total, EP_IWBPending as COUNT from defects_infor_component_etc

union
select ProjectName, ModelCode, 'EP_MagicInfoClosed' Component, EP_MagicInfoTotal as Total, EP_MagicInfoClosed as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'EP_MagicInfoResolved' Component, EP_MagicInfoTotal as Total, EP_MagicInfoResolved as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'EP_MagicInfoRejected' Component, EP_MagicInfoTotal as Total, EP_MagicInfoRejected as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'EP_MagicInfoPending' Component, EP_MagicInfoTotal as Total, EP_MagicInfoPending as COUNT from defects_infor_component_etc

union
select ProjectName, ModelCode, 'ES_MagicIWBClosed' Component, ES_MagicIWBTotal as Total, ES_MagicIWBClosed as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'ES_MagicIWBResolved' Component, ES_MagicIWBTotal as Total, ES_MagicIWBResolved as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'ES_MagicIWBRejected' Component, ES_MagicIWBTotal as Total, ES_MagicIWBRejected as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'ES_MagicIWBPending' Component, ES_MagicIWBTotal as Total, ES_MagicIWBPending as COUNT from defects_infor_component_etc

union
select ProjectName, ModelCode, 'ES_MagicInfoClosed' Component, ES_MagicInfoTotal as Total, ES_MagicInfoClosed as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'ES_MagicInfoResolved' Component, ES_MagicInfoTotal as Total, ES_MagicInfoResolved as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'ES_MagicInfoRejected' Component, ES_MagicInfoTotal as Total, ES_MagicInfoRejected as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'ES_MagicInfoPending' Component, ES_MagicInfoTotal as Total, ES_MagicInfoPending as COUNT from defects_infor_component_etc

union
select ProjectName, ModelCode, 'ES_Management_ApplicationClosed' Component, ES_Management_ApplicationTotal as Total, ES_Management_ApplicationClosed as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'ES_Management_ApplicationResolved' Component, ES_Management_ApplicationTotal as Total, ES_Management_ApplicationResolved as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'ES_Management_ApplicationRejected' Component, ES_Management_ApplicationTotal as Total, ES_Management_ApplicationRejected as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'ES_Management_ApplicationPending' Component, ES_Management_ApplicationTotal as Total, ES_Management_ApplicationPending as COUNT from defects_infor_component_etc

union
select ProjectName, ModelCode, 'HP_AndroidClosed' Component, HP_AndroidTotal as Total, HP_AndroidClosed as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'HP_AndroidResolved' Component, HP_AndroidTotal as Total, HP_AndroidResolved as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'HP_AndroidRejected' Component, HP_AndroidTotal as Total, HP_AndroidRejected as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'HP_AndroidPending' Component, HP_AndroidTotal as Total, HP_AndroidPending as COUNT from defects_infor_component_etc

union
select ProjectName, ModelCode, 'NAP_AppMWClosed' Component, NAP_AppMWTotal as Total, NAP_AppMWClosed as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'NAP_AppMWResolved' Component, NAP_AppMWTotal as Total, NAP_AppMWResolved as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'NAP_AppMWRejected' Component, NAP_AppMWTotal as Total, NAP_AppMWRejected as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'NAP_AppMWPending' Component, NAP_AppMWTotal as Total, NAP_AppMWPending as COUNT from defects_infor_component_etc

union
select ProjectName, ModelCode, 'OCP_APPClosed' Component, OCP_APPTotal as Total, OCP_APPClosed as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'OCP_APPResolved' Component, OCP_APPTotal as Total, OCP_APPResolved as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'OCP_APPRejected' Component, OCP_APPTotal as Total, OCP_APPRejected as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'OCP_APPPending' Component, OCP_APPTotal as Total, OCP_APPPending as COUNT from defects_infor_component_etc

union
select ProjectName, ModelCode, 'OCP_HALClosed' Component, OCP_HALTotal as Total, OCP_HALClosed as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'OCP_HALResolved' Component, OCP_HALTotal as Total, OCP_HALResolved as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'OCP_HALRejected' Component, OCP_HALTotal as Total, OCP_HALRejected as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'OCP_HALPending' Component, OCP_HALTotal as Total, OCP_HALPending as COUNT from defects_infor_component_etc

union
select ProjectName, ModelCode, 'OCP_MWClosed' Component, OCP_MWTotal as Total, OCP_MWClosed as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'OCP_MWResolved' Component, OCP_MWTotal as Total, OCP_MWResolved as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'OCP_MWRejected' Component, OCP_MWTotal as Total, OCP_MWRejected as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'OCP_MWPending' Component, OCP_MWTotal as Total, OCP_MWPending as COUNT from defects_infor_component_etc

union
select ProjectName, ModelCode, 'OP_ChromiumOSClosed' Component, OP_ChromiumOSTotal as Total, OP_ChromiumOSClosed as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'OP_ChromiumOSResolved' Component, OP_ChromiumOSTotal as Total, OP_ChromiumOSResolved as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'OP_ChromiumOSRejected' Component, OP_ChromiumOSTotal as Total, OP_ChromiumOSRejected as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'OP_ChromiumOSPending' Component, OP_ChromiumOSTotal as Total, OP_ChromiumOSPending as COUNT from defects_infor_component_etc

union
select ProjectName, ModelCode, 'OP_PrjClosed' Component, OP_PrjTotal as Total, OP_PrjClosed as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'OP_PrjResolved' Component, OP_PrjTotal as Total, OP_PrjResolved as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'OP_PrjRejected' Component, OP_PrjTotal as Total, OP_PrjRejected as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'OP_PrjPending' Component, OP_PrjTotal as Total, OP_PrjPending as COUNT from defects_infor_component_etc

union
select ProjectName, ModelCode, 'OP_PrjNonSmartClosed' Component, OP_PrjNonSmartTotal as Total, OP_PrjNonSmartClosed as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'OP_PrjNonSmartResolved' Component, OP_PrjNonSmartTotal as Total, OP_PrjNonSmartResolved as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'OP_PrjNonSmartRejected' Component, OP_PrjNonSmartTotal as Total, OP_PrjNonSmartRejected as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'OP_PrjNonSmartPending' Component, OP_PrjNonSmartTotal as Total, OP_PrjNonSmartPending as COUNT from defects_infor_component_etc

union
select ProjectName, ModelCode, 'OS_VDLinuxClosed' Component, OS_VDLinuxTotal as Total, OS_VDLinuxClosed as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'OS_VDLinuxResolved' Component, OS_VDLinuxTotal as Total, OS_VDLinuxResolved as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'OS_VDLinuxRejected' Component, OS_VDLinuxTotal as Total, OS_VDLinuxRejected as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'OS_VDLinuxPending' Component, OS_VDLinuxTotal as Total, OS_VDLinuxPending as COUNT from defects_infor_component_etc

union
select ProjectName, ModelCode, 'OS_VDLinuxNonSmartClosed' Component, OS_VDLinuxNonSmartTotal as Total, OS_VDLinuxNonSmartClosed as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'OS_VDLinuxNonSmartResolved' Component, OS_VDLinuxNonSmartTotal as Total, OS_VDLinuxNonSmartResolved as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'OS_VDLinuxNonSmartRejected' Component, OS_VDLinuxNonSmartTotal as Total, OS_VDLinuxNonSmartRejected as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'OS_VDLinuxNonSmartPending' Component, OS_VDLinuxNonSmartTotal as Total, OS_VDLinuxNonSmartPending as COUNT from defects_infor_component_etc

union
select ProjectName, ModelCode, 'PP_HALClosed' Component, PP_HALTotal as Total, PP_HALClosed as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'PP_HALResolved' Component, PP_HALTotal as Total, PP_HALResolved as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'PP_HALRejected' Component, PP_HALTotal as Total, PP_HALRejected as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'PP_HALPending' Component, PP_HALTotal as Total, PP_HALPending as COUNT from defects_infor_component_etc

union
select ProjectName, ModelCode, 'PP_JavaMWClosed' Component, PP_JavaMWTotal as Total, PP_JavaMWClosed as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'PP_JavaMWResolved' Component, PP_JavaMWTotal as Total, PP_JavaMWResolved as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'PP_JavaMWRejected' Component, PP_JavaMWTotal as Total, PP_JavaMWRejected as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'PP_JavaMWPending' Component, PP_JavaMWTotal as Total, PP_JavaMWPending as COUNT from defects_infor_component_etc

union
select ProjectName, ModelCode, 'PP_MWAppClosed' Component, PP_MWAppTotal as Total, PP_MWAppClosed as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'PP_MWAppResolved' Component, PP_MWAppTotal as Total, PP_MWAppResolved as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'PP_MWAppRejected' Component, PP_MWAppTotal as Total, PP_MWAppRejected as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'PP_MWAppPending' Component, PP_MWAppTotal as Total, PP_MWAppPending as COUNT from defects_infor_component_etc

union
select ProjectName, ModelCode, 'PrecedingClosed' Component, PrecedingTotal as Total, PrecedingClosed as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'PrecedingResolved' Component, PrecedingTotal as Total, PrecedingResolved as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'PrecedingRejected' Component, PrecedingTotal as Total, PrecedingRejected as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'PrecedingPending' Component, PrecedingTotal as Total, PrecedingPending as COUNT from defects_infor_component_etc

union
select ProjectName, ModelCode, 'SP_ChipClosed' Component, SP_ChipTotal as Total, SP_ChipClosed as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'SP_ChipResolved' Component, SP_ChipTotal as Total, SP_ChipResolved as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'SP_ChipRejected' Component, SP_ChipTotal as Total, SP_ChipRejected as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'SP_ChipPending' Component, SP_ChipTotal as Total, SP_ChipPending as COUNT from defects_infor_component_etc

union
select ProjectName, ModelCode, 'SP_ChipNonSmartClosed' Component, SP_ChipNonSmartTotal as Total, SP_ChipNonSmartClosed as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'SP_ChipNonSmartResolved' Component, SP_ChipNonSmartTotal as Total, SP_ChipNonSmartResolved as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'SP_ChipNonSmartRejected' Component, SP_ChipNonSmartTotal as Total, SP_ChipNonSmartRejected as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'SP_ChipNonSmartPending' Component, SP_ChipNonSmartTotal as Total, SP_ChipNonSmartPending as COUNT from defects_infor_component_etc

union
select ProjectName, ModelCode, 'SWC_BASE_MAINClosed' Component, SWC_BASE_MAINTotal as Total, SWC_BASE_MAINClosed as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'SWC_BASE_MAINResolved' Component, SWC_BASE_MAINTotal as Total, SWC_BASE_MAINResolved as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'SWC_BASE_MAINRejected' Component, SWC_BASE_MAINTotal as Total, SWC_BASE_MAINRejected as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'SWC_BASE_MAINPending' Component, SWC_BASE_MAINTotal as Total, SWC_BASE_MAINPending as COUNT from defects_infor_component_etc

union
select ProjectName, ModelCode, 'SystemArchitectureClosed' Component, SystemArchitectureTotal as Total, SystemArchitectureClosed as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'SystemArchitectureResolved' Component, SystemArchitectureTotal as Total, SystemArchitectureResolved as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'SystemArchitectureRejected' Component, SystemArchitectureTotal as Total, SystemArchitectureRejected as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'SystemArchitecturePending' Component, SystemArchitectureTotal as Total, SystemArchitecturePending as COUNT from defects_infor_component_etc

union
select ProjectName, ModelCode, 'SystemArchitectureNonSmartClosed' Component, SystemArchitectureNonSmartTotal as Total, SystemArchitectureNonSmartClosed as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'SystemArchitectureNonSmartResolved' Component, SystemArchitectureNonSmartTotal as Total, SystemArchitectureNonSmartResolved as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'SystemArchitectureNonSmartRejected' Component, SystemArchitectureNonSmartTotal as Total, SystemArchitectureNonSmartRejected as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'SystemArchitectureNonSmartPending' Component, SystemArchitectureNonSmartTotal as Total, SystemArchitectureNonSmartPending as COUNT from defects_infor_component_etc

union
select ProjectName, ModelCode, 'SystemPlatformClosed' Component, SystemPlatformTotal as Total, SystemPlatformClosed as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'SystemPlatformResolved' Component, SystemPlatformTotal as Total, SystemPlatformResolved as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'SystemPlatformRejected' Component, SystemPlatformTotal as Total, SystemPlatformRejected as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'SystemPlatformPending' Component, SystemPlatformTotal as Total, SystemPlatformPending as COUNT from defects_infor_component_etc

union
select ProjectName, ModelCode, 'SystemPlatformNonSmartClosed' Component, SystemPlatformNonSmartTotal as Total, SystemPlatformNonSmartClosed as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'SystemPlatformNonSmartResolved' Component, SystemPlatformNonSmartTotal as Total, SystemPlatformNonSmartResolved as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'SystemPlatformNonSmartRejected' Component, SystemPlatformNonSmartTotal as Total, SystemPlatformNonSmartRejected as COUNT from defects_infor_component_etc
union
select ProjectName, ModelCode, 'SystemPlatformNonSmartPending' Component, SystemPlatformNonSmartTotal as Total, SystemPlatformNonSmartPending as COUNT from defects_infor_component_etc

 comp_total:

drop table if exists comp_total ;
create table comp_total as
select ProjectName, Component,sum(Total) as Total,sum(COUNT) as COUNT from comp_tp group by ProjectName,Component 
union
select ProjectName, Component,sum(Total) as Total,sum(COUNT) as COUNT from comp_ap group by ProjectName,Component 
union
select ProjectName, Component,sum(Total) as Total,sum(COUNT) as COUNT from comp_bp group by ProjectName,Component 
union
select ProjectName, Component,sum(Total) as Total,sum(COUNT) as COUNT from comp_etc group by ProjectName,Component 
order by Total desc,Component;

 comp_model:

drop table if exists comp_model;
create table comp_model as
select ProjectName,ModelCode, Component,sum(Total) as Total,sum(COUNT) as COUNT from comp_tp group by ModelCode,Component
union
select ProjectName,ModelCode, Component,sum(Total) as Total,sum(COUNT) as COUNT from comp_ap group by ModelCode,Component 
union
select ProjectName,ModelCode, Component,sum(Total) as Total,sum(COUNT) as COUNT from comp_bp group by ModelCode,Component 
union
select ProjectName, ModelCode, Component,sum(Total) as Total,sum(COUNT) as COUNT from comp_etc group by ModelCode,Component
order by Total desc,Component

 block_temp:

drop table if exists block_temp;
create table block_temp as
select ProjectName, ModelCode, 'AccessibilityClosed' Component, AccessibilityTotal as Total, AccessibilityClosed as COUNT from defects_infor_block
union 
select ProjectName, ModelCode, 'AccessibilityResolved' Component,AccessibilityTotal as Total,AccessibilityResolved as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'AccessibilityRejected' Component,AccessibilityTotal as Total, AccessibilityRejected as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'AccessibilityPending' Component, AccessibilityTotal as Total,AccessibilityPending as COUNT from defects_infor_block

union
select ProjectName, ModelCode, 'AppsClosed' Component, AppsTotal as Total, AppsClosed as COUNT from defects_infor_block
union 
select ProjectName, ModelCode, 'AppsResolved' Component,AppsTotal as Total,AppsResolved as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'AppsRejected' Component,AppsTotal as Total, AppsRejected as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'AppsPending' Component,AppsTotal as Total,AppsPending as COUNT from defects_infor_block

union
select ProjectName, ModelCode, 'AppsPanelClosed' Component, AppsPanelTotal as Total, AppsPanelClosed as COUNT from defects_infor_block
union 
select ProjectName, ModelCode, 'AppsPanelResolved' Component,AppsPanelTotal as Total,AppsPanelResolved as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'AppsPanelRejected' Component,AppsPanelTotal as Total, AppsPanelRejected as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'AppsPanelPending' Component,AppsPanelTotal as Total,AppsPanelPending as COUNT from defects_infor_block

union
select ProjectName, ModelCode, 'AVHomeMenuClosed' Component, AVHomeMenuTotal as Total, AVHomeMenuClosed as COUNT from defects_infor_block
union 
select ProjectName, ModelCode, 'AVHomeMenuResolved' Component,AVHomeMenuTotal as Total,AVHomeMenuResolved as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'AVHomeMenuRejected' Component,AVHomeMenuTotal as Total, AVHomeMenuRejected as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'AVHomeMenuPending' Component,AVHomeMenuTotal as Total,AVHomeMenuPending as COUNT from defects_infor_block

union
select ProjectName, ModelCode, 'B2BClosed' Component, B2BTotal as Total, B2BClosed as COUNT from defects_infor_block
union 
select ProjectName, ModelCode, 'B2BResolved' Component,B2BTotal as Total,B2BResolved as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'B2BRejected' Component,B2BTotal as Total, B2BRejected as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'B2BPending' Component,B2BTotal as Total,B2BPending as COUNT from defects_infor_block

union
select ProjectName, ModelCode, 'BasicFunctionClosed' Component, BasicFunctionTotal as Total, BasicFunctionClosed as COUNT from defects_infor_block
union 
select ProjectName, ModelCode, 'BasicFunctionResolved' Component,BasicFunctionTotal as Total,BasicFunctionResolved as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'BasicFunctionRejected' Component,BasicFunctionTotal as Total, BasicFunctionRejected as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'BasicFunctionPending' Component,BasicFunctionTotal as Total,BasicFunctionPending as COUNT from defects_infor_block

union
select ProjectName, ModelCode, 'BluetoothClosed' Component, BluetoothTotal as Total, BluetoothClosed as COUNT from defects_infor_block
union 
select ProjectName, ModelCode, 'BluetoothResolved' Component,BluetoothTotal as Total,BluetoothResolved as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'BluetoothRejected' Component,BluetoothTotal as Total, BluetoothRejected as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'BluetoothPending' Component,BluetoothTotal as Total,BluetoothPending as COUNT from defects_infor_block

union
select ProjectName, ModelCode, 'ChannelBroadcastingClosed' Component, ChannelBroadcastingTotal as Total, ChannelBroadcastingClosed as COUNT from defects_infor_block
union 
select ProjectName, ModelCode, 'ChannelBroadcastingResolved' Component,ChannelBroadcastingTotal as Total,ChannelBroadcastingResolved as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'ChannelBroadcastingRejected' Component,ChannelBroadcastingTotal as Total, ChannelBroadcastingRejected as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'ChannelBroadcastingPending' Component,ChannelBroadcastingTotal as Total,ChannelBroadcastingPending as COUNT from defects_infor_block

union
select ProjectName, ModelCode, 'ConvergenceClosed' Component, ConvergenceTotal as Total, ConvergenceClosed as COUNT from defects_infor_block
union 
select ProjectName, ModelCode, 'ConvergenceResolved' Component,ConvergenceTotal as Total,ConvergenceResolved as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'ConvergenceRejected' Component,ConvergenceTotal as Total, ConvergenceRejected as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'ConvergencePending' Component,ConvergenceTotal as Total,ConvergencePending as COUNT from defects_infor_block

union
select ProjectName, ModelCode, 'DISCClosed' Component, DISCTotal as Total, DISCClosed as COUNT from defects_infor_block
union 
select ProjectName, ModelCode, 'DISCResolved' Component,DISCTotal as Total,DISCResolved as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'DISCRejected' Component,DISCTotal as Total, DISCRejected as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'DISCPending' Component,DISCTotal as Total,DISCPending as COUNT from defects_infor_block

union
select ProjectName, ModelCode, 'DriverClosed' Component, DriverTotal as Total, DriverClosed as COUNT from defects_infor_block
union 
select ProjectName, ModelCode, 'DriverResolved' Component,DriverTotal as Total,DriverResolved as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'DriverRejected' Component,DriverTotal as Total, DriverRejected as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'DriverPending' Component,DriverTotal as Total,DriverPending as COUNT from defects_infor_block

union
select ProjectName, ModelCode, 'EdenClosed' Component, EdenTotal as Total, EdenClosed as COUNT from defects_infor_block
union 
select ProjectName, ModelCode, 'EdenResolved' Component,EdenTotal as Total,EdenResolved as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'EdenRejected' Component,EdenTotal as Total, EdenRejected as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'EdenPending' Component,EdenTotal as Total,EdenPending as COUNT from defects_infor_block

union
select ProjectName, ModelCode, 'ExternalInputOutputClosed' Component, ExternalInputOutputTotal as Total, ExternalInputOutputClosed as COUNT from defects_infor_block
union 
select ProjectName, ModelCode, 'ExternalInputOutputResolved' Component,ExternalInputOutputTotal as Total,ExternalInputOutputResolved as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'ExternalInputOutputRejected' Component,ExternalInputOutputTotal as Total, ExternalInputOutputRejected as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'ExternalInputOutputPending' Component,ExternalInputOutputTotal as Total,ExternalInputOutputPending as COUNT from defects_infor_block

union
select ProjectName, ModelCode, 'FactoryAutomationClosed' Component, FactoryAutomationTotal as Total, FactoryAutomationClosed as COUNT from defects_infor_block
union 
select ProjectName, ModelCode, 'FactoryAutomationResolved' Component,FactoryAutomationTotal as Total,FactoryAutomationResolved as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'FactoryAutomationRejected' Component,FactoryAutomationTotal as Total, FactoryAutomationRejected as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'FactoryAutomationPending' Component,FactoryAutomationTotal as Total,FactoryAutomationPending as COUNT from defects_infor_block

union
select ProjectName, ModelCode, 'HotelClosed' Component, HotelTotal as Total, HotelClosed as COUNT from defects_infor_block
union 
select ProjectName, ModelCode, 'HotelResolved' Component,HotelTotal as Total,HotelResolved as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'HotelRejected' Component,HotelTotal as Total, HotelRejected as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'HotelPending' Component,HotelTotal as Total,HotelPending as COUNT from defects_infor_block

union
select ProjectName, ModelCode, 'LFDClosed' Component, LFDTotal as Total, LFDClosed as COUNT from defects_infor_block
union 
select ProjectName, ModelCode, 'LFDResolved' Component,LFDTotal as Total,LFDResolved as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'LFDRejected' Component,LFDTotal as Total, LFDRejected as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'LFDPending' Component,LFDTotal as Total,LFDPending as COUNT from defects_infor_block

union
select ProjectName, ModelCode, 'LFDHOMEClosed' Component, LFDHOMETotal as Total, LFDHOMEClosed as COUNT from defects_infor_block
union 
select ProjectName, ModelCode, 'LFDHOMEResolved' Component,LFDHOMETotal as Total,LFDHOMEResolved as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'LFDHOMERejected' Component,LFDHOMETotal as Total, LFDHOMERejected as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'LFDHOMEPending' Component,LFDHOMETotal as Total,LFDHOMEPending as COUNT from defects_infor_block

union
select ProjectName, ModelCode, 'MotionFunctionClosed' Component, MotionFunctionTotal as Total, MotionFunctionClosed as COUNT from defects_infor_block
union 
select ProjectName, ModelCode, 'MotionFunctionResolved' Component,MotionFunctionTotal as Total,MotionFunctionResolved as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'MotionFunctionRejected' Component,MotionFunctionTotal as Total, MotionFunctionRejected as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'MotionFunctionPending' Component,MotionFunctionTotal as Total,MotionFunctionPending as COUNT from defects_infor_block

union
select ProjectName, ModelCode, 'NetworkClosed' Component, NetworkTotal as Total, NetworkClosed as COUNT from defects_infor_block
union 
select ProjectName, ModelCode, 'NetworkResolved' Component,NetworkTotal as Total,NetworkResolved as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'NetworkRejected' Component,NetworkTotal as Total, NetworkRejected as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'NetworkPending' Component,NetworkTotal as Total,NetworkPending as COUNT from defects_infor_block

union
select ProjectName, ModelCode, 'PerformanceClosed' Component, PerformanceTotal as Total, PerformanceClosed as COUNT from defects_infor_block
union 
select ProjectName, ModelCode, 'PerformanceResolved' Component,PerformanceTotal as Total,PerformanceResolved as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'PerformanceRejected' Component,PerformanceTotal as Total, PerformanceRejected as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'PerformancePending' Component,PerformanceTotal as Total,PerformancePending as COUNT from defects_infor_block

union
select ProjectName, ModelCode, 'PictureClosed' Component, PictureTotal as Total, PictureClosed as COUNT from defects_infor_block
union 
select ProjectName, ModelCode, 'PictureResolved' Component,PictureTotal as Total,PictureResolved as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'PictureRejected' Component,PictureTotal as Total, PictureRejected as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'PicturePending' Component,PictureTotal as Total,PicturePending as COUNT from defects_infor_block

union
select ProjectName, ModelCode, 'PlugPlayClosed' Component, PlugPlayTotal as Total, PlugPlayClosed as COUNT from defects_infor_block
union 
select ProjectName, ModelCode, 'PlugPlayResolved' Component,PlugPlayTotal as Total,PlugPlayResolved as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'PlugPlayRejected' Component,PlugPlayTotal as Total, PlugPlayRejected as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'PlugPlayPending' Component,PlugPlayTotal as Total,PlugPlayPending as COUNT from defects_infor_block

union
select ProjectName, ModelCode, 'PVODAppsClosed' Component, PVODAppsTotal as Total, PVODAppsClosed as COUNT from defects_infor_block
union 
select ProjectName, ModelCode, 'PVODAppsResolved' Component,PVODAppsTotal as Total,PVODAppsResolved as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'PVODAppsRejected' Component,PVODAppsTotal as Total, PVODAppsRejected as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'PVODAppsPending' Component,PVODAppsTotal as Total,PVODAppsPending as COUNT from defects_infor_block

union
select ProjectName, ModelCode, 'RecognitionClosed' Component, RecognitionTotal as Total, RecognitionClosed as COUNT from defects_infor_block
union 
select ProjectName, ModelCode, 'RecognitionResolved' Component,RecognitionTotal as Total,RecognitionResolved as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'RecognitionRejected' Component,RecognitionTotal as Total, RecognitionRejected as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'RecognitionPending' Component,RecognitionTotal as Total,RecognitionPending as COUNT from defects_infor_block

union
select ProjectName, ModelCode, 'SecurityClosed' Component, SecurityTotal as Total, SecurityClosed as COUNT from defects_infor_block
union 
select ProjectName, ModelCode, 'SecurityResolved' Component,SecurityTotal as Total,SecurityResolved as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'SecurityRejected' Component,SecurityTotal as Total, SecurityRejected as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'SecurityPending' Component,SecurityTotal as Total,SecurityPending as COUNT from defects_infor_block

union
select ProjectName, ModelCode, 'ShopToolsClosed' Component, ShopToolsTotal as Total, ShopToolsClosed as COUNT from defects_infor_block
union 
select ProjectName, ModelCode, 'ShopToolsResolved' Component,ShopToolsTotal as Total,ShopToolsResolved as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'ShopToolsRejected' Component,ShopToolsTotal as Total, ShopToolsRejected as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'ShopToolsPending' Component,ShopToolsTotal as Total,ShopToolsPending as COUNT from defects_infor_block

union
select ProjectName, ModelCode, 'SmartHubClosed' Component, SmartHubTotal as Total, SmartHubClosed as COUNT from defects_infor_block
union 
select ProjectName, ModelCode, 'SmartHubResolved' Component,SmartHubTotal as Total,SmartHubResolved as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'SmartHubRejected' Component,SmartHubTotal as Total, SmartHubRejected as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'SmartHubPending' Component,SmartHubTotal as Total,SmartHubPending as COUNT from defects_infor_block

union
select ProjectName, ModelCode, 'SoundClosed' Component, SoundTotal as Total, SoundClosed as COUNT from defects_infor_block
union 
select ProjectName, ModelCode, 'SoundResolved' Component,SoundTotal as Total,SoundResolved as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'SoundRejected' Component,SoundTotal as Total, SoundRejected as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'SoundPending' Component,SoundTotal as Total,SoundPending as COUNT from defects_infor_block

union
select ProjectName, ModelCode, 'SourceClosed' Component, SourceTotal as Total, SourceClosed as COUNT from defects_infor_block
union 
select ProjectName, ModelCode, 'SourceResolved' Component,SourceTotal as Total,SourceResolved as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'SourceRejected' Component,SourceTotal as Total, SourceRejected as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'SourcePending' Component,SourceTotal as Total,SourcePending as COUNT from defects_infor_block

union
select ProjectName, ModelCode, 'SupportClosed' Component, SupportTotal as Total, SupportClosed as COUNT from defects_infor_block
union 
select ProjectName, ModelCode, 'SupportResolved' Component,SupportTotal as Total,SupportResolved as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'SupportRejected' Component,SupportTotal as Total, SupportRejected as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'SupportPending' Component,SupportTotal as Total,SupportPending as COUNT from defects_infor_block

union
select ProjectName, ModelCode, 'SystemClosed' Component, SystemTotal as Total, SystemClosed as COUNT from defects_infor_block
union 
select ProjectName, ModelCode, 'SystemResolved' Component,SystemTotal as Total,SystemResolved as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'SystemRejected' Component,SystemTotal as Total, SystemRejected as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'SystemPending' Component,SystemTotal as Total,SystemPending as COUNT from defects_infor_block

union
select ProjectName, ModelCode, 'UsabilityClosed' Component, UsabilityTotal as Total, UsabilityClosed as COUNT from defects_infor_block
union 
select ProjectName, ModelCode, 'UsabilityResolved' Component,UsabilityTotal as Total,UsabilityResolved as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'UsabilityRejected' Component,UsabilityTotal as Total, UsabilityRejected as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'UsabilityPending' Component,UsabilityTotal as Total,UsabilityPending as COUNT from defects_infor_block

union
select ProjectName, ModelCode, 'UXClosed' Component, UXTotal as Total, UXClosed as COUNT from defects_infor_block
union 
select ProjectName, ModelCode, 'UXResolved' Component,UXTotal as Total,UXResolved as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'UXRejected' Component,UXTotal as Total, UXRejected as COUNT from defects_infor_block
union
select ProjectName, ModelCode, 'UXPending' Component,UXTotal as Total,UXPending as COUNT from defects_infor_block

 block_total:

drop table if exists block_total;
create table block_total as
select ProjectName, Component,sum(Total) as Total,sum(COUNT) as COUNT from block_temp  group by ProjectName, Component 
order by Total desc,Component;

 block_model:

drop table if exists block_model;
create table block_model as
select ProjectName, ModelCode, Component,sum(Total) as Total,sum(COUNT) as COUNT from block_temp group by ModelCode,Component
order by Total desc,Component
原文地址:https://www.cnblogs.com/wujixing/p/5164400.html