--Query Base per Tabelle
-- COMBINATIONGROUP
SELECT COMMUNITYID,
       COMBINATIONGROUPID,
       DESCRIPTION,
       STARTDATE,
       ENDDATE,
       VARIABLEID,
       SETID,
       ISBYCRITERION,
       CRITERIONTYPE,
       CRITERIONPARAM,
       ISALLOWED
  FROM COMBINATIONGROUP
  WHERE COMMUNITYID='PUMABAN' AND DESCRIPTION like '% %';
-- CUBE
SELECT COMMUNITYID,
       CONTEXTID,
       CUBEID,
       DESCRIPTION,
       STARTDATE,
       ENDDATE,
       CUBESTATTYPE,
       PROCESSCUBESETID,
       SURVEYID,
       CUBEABOUTCUBETYPE,
       IMPLICITVALUE,
       USAGELEVEL,
       ISPROCESSCUBESET,
       VERSIONINGMETHOD,
       FREQUENCY,
       CIRCULARITY
  FROM CUBE
  WHERE  COMMUNITYID='PUMABAN' AND DESCRIPTION like '% %';
--CUBESETCOMP  
SELECT COMMUNITYID,
       CUBEID,
       CUBECONTEXTID,
       CUBESETID,
       CUBESETCONTEXTID,
       STARTDATE,
       ENDDATE,
       SURVEYID,
       ISCOLLECTED,
       ISCUBESET,
       CUBESTATTYPE
  FROM CUBESETCOMP
  WHERE COMMUNITYID='PUMABAN';
--DOMAIN  
SELECT COMMUNITYID,
       DOMAINID,
       DESCRIPTION,
       STARTDATE,
       ENDDATE,
       ALTERNATEID,
       ISCODED,
       PLATFORMDEPDTYPE,
       UNIVERSALVALUE
  FROM DOMAIN
  WHERE COMMUNITYID='PUMABAN' AND DESCRIPTION like '% %';
-- DOMAINSET
SELECT COMMUNITYID,
       SETID,
       DESCRIPTION,
       DOMAINID,
       STARTDATE,
       ENDDATE,
       ISENUMERATED,
       ISBYCRITERION,
       ISBOOLEAN,
       ISORDINAL,
       ISFULLSET,
       CRITERIONTYPE,
       CRITERIONPARAM
  FROM DOMAINSET
  WHERE COMMUNITYID='PUMABAN' AND DESCRIPTION like '% %';
--EXPRESSION
SELECT COMMUNITYID,
       EXPRESSIONID,
       DESCRIPTION,
       EXPRESSIONSTRING,
       EXPRESSIONTYPE,
       TEMPLATEID,
       USEDVALUE
  FROM EXPRESSION
  WHERE COMMUNITYID='PUMABAN' AND DESCRIPTION like '% %';
--EXPRSTRUCTURE
SELECT COMMUNITYID,
       EXPRESSIONID,
       VARIABLEID,
       ROLE
  FROM EXPRSTRUCTURE
  WHERE COMMUNITYID='PUMABAN';
--LABEL
SELECT COMMUNITYID,
       CONTEXTID,
       LOCALID,
       OBJECTTYPE,
       PROPERTYID,
       PURPOSE,
       LABEL,
       LOCALE,
       OBJSURVEYID
  FROM LABEL
  WHERE COMMUNITYID='PUMABAN';
--STRUCTUREITEM
SELECT COMMUNITYID,
       CONTEXTID,
       CUBEID,
       VARIABLEID,
       SETID,
       ROLE,
       SURVEYID,
       DOMAINID,
       UNIQUEVALUEID,
       PROPERTY,
       CUBESTATTYPE,
       STARTDATE,
       ENDDATE
  FROM STRUCTUREITEM
  WHERE COMMUNITYID='PUMABAN';
--SURVEY  
SELECT COMMUNITYID,
       SURVEYID,
       STARTDATE,
       ENDDATE,
       DESCRIPTION,
       SURVEYTYPE,
       DEF_CIRCULARITY
  FROM SURVEY
  WHERE COMMUNITYID='PUMABAN' AND DESCRIPTION like '% %';
--TRANSFORMATION
SELECT COMMUNITYID,
       TRANSFORMATIONID,
       DESCRIPTION,
       STARTDATE,
       ENDDATE,
       EXPRESSIONID,
       RESULTLOCALID,
       EXPRESSIONTYPE
  FROM TRANSFORMATION
  WHERE COMMUNITYID='PUMABAN' AND DESCRIPTION like '% %';
--VARIABLE
SELECT COMMUNITYID,
       VARIABLEID,
       DESCRIPTION,
       STARTDATE,
       ENDDATE,
       DOMAINID,
       DEFINITIONSETID,
       UNIVERSALVALUE,
       CIRCULARITY,
       REPETITIVE,
       PROVFG,
       COMPOSED,
       TRASC,
       UTILCOE,
       UTILBIL,
       UTILBILIAS,
       UTILANAC,
       ISCODED,
       UTILCR,
       UTILANAG
  FROM VARIABLE
  WHERE COMMUNITYID='PUMABAN' AND DESCRIPTION like '% %';
--VARIABLERANGE
SELECT COMMUNITYID,
       TYPERANGE,
       VARIABLEIDFROM,
       VARIABLEIDTO,
       STARTDATE,
       ENDDATE,
       DESCRIPTION
  FROM VARIABLERANGE
  WHERE COMMUNITYID='PUMABAN' AND DESCRIPTION like '% %';

--Query Base per Viste
--CUBEFOREXPR
SELECT EXPRESSIONID,
       EXPRESSIONTYPE,
       CUBEID
  FROM CUBEFOREXPR
 WHERE EXPRESSIONID like '%017%';
--EXPRFORTRANSFORMATION
SELECT EXPRESSIONID,
       GENERATEDCUBE,
       EXPRCOMPONENT,
       EXPRESSIONTYPE
  FROM EXPRFORTRANSFORMATION
 WHERE EXPRESSIONID like '%A1_4002506%';
--ROUTINEFOREXPR
SELECT EXPRESSIONID,
       EXPRESSIONTYPE,
       ROUTINEID
  FROM ROUTINEFOREXPR
 WHERE EXPRESSIONID like '%_4005502_0010_%';



  

