select <#list singleSet.getPSDEDataSetGroupParams() as groupParam><#if groupParam_index gt 0>,</#if><#if groupParam.isEnableGroup()>${groupParam.getName()}<#else>${groupParam.getGroupCode()}</#if> as "${groupParam.getName()?lower_case}"</#list> from (
select <#list singleSet.getPSDEDataSetGroupParams() as groupParam><#if groupParam_index gt 0>,</#if><#if groupParam.isEnableGroup()>${groupParam.getName()}<#else>${groupParam.getGroupCode()}</#if> as "${groupParam.getName()?lower_case}"</#list> from (
</#if>
select t1.* from (
select t1.* from (
<#list singleSet.getPSDEDataQueries() as dataQuery>
<#list singleSet.getPSDEDataQueries() as dataQuery>
<#if dataQuery_index gt 0>
<#if dataQuery_index gt 0>
...
@@ -158,8 +160,10 @@ TARGET=PSDATAENTITY
...
@@ -158,8 +160,10 @@ TARGET=PSDATAENTITY
)t1
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere"><#noparse>${ew.sqlSegment}</#noparse></if></where>
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere"><#noparse>${ew.sqlSegment}</#noparse></if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere"><#noparse>${ew.sqlSegment}</#noparse></if>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere"><#noparse>${ew.sqlSegment}</#noparse></if>
<#if singleSet.isEnableGroup()>
)
)
group by <#assign groupIndex = 0 ><#list singleSet.getPSDEDataSetGroupParams() as groupParam><#if groupParam.isEnableGroup()><#if groupIndex gt 0>,</#if>${groupParam.getName()?lower_case}<#assign groupIndex = groupIndex + 1 ></#if></#list>
group by <#assign groupIndex = 0 ><#list singleSet.getPSDEDataSetGroupParams() as groupParam><#if groupParam.isEnableGroup()><#if groupIndex gt 0>,</#if>${groupParam.getName()?lower_case}<#assign groupIndex = groupIndex + 1 ></#if></#list>