Hi
When I use count along with grouping set as shown below,
SELECT SurveyCategoryID,SurveyFormItemID,ResponseMonth AS GroupByField1,ResponseYear AS GroupByField2,SUM(SumFavourable) AS FavRespCount, SUM(SumScaleOptionValueSum) AS ScaleOptionValueSum,SUM(SumTotalRespondentCount) AS TotalRespCount, COUNT(DISTINCT SurveyParticipantID) AS TotalDistinctRespCount FROM PulseResponse WHERE ClientID = 94 AND SurveyFormID = 21 AND ParticipantStatus = 1 AND SurveyStatusFlag = 3 AND IsRatingScale = 1 GROUP BY GROUPING SETS ((SurveyCategoryID,ResponseMonth,ResponseYear), (SurveyCategoryID), (SurveyFormItemID,SurveyCategoryID,ResponseMonth,ResponseYear), (SurveyFormItemID,SurveyCategoryID))
It’s throwing the below error.
The exception contained withinMappableContainerException couldnot be mapped to a response, re-throwing to the HTTP containerjava.lang.AssertionError: Typemismatch: rowtype of new rel:RecordType(BIGINT NOT NULLResponseQuarter, BIGINT NOT NULLResponseYear, BIGINT NOT NULLSurveyCategoryID, BIGINT NOT NULLSurveyFormItemID, BIGINT NOTNULL FavRespCount, BIGINT NOTNULL ScaleOptionValueSum, BIGINTNOT NULL TotalRespCount, BIGINTNOT NULL TotalDistinctRespCount)NOT NULL rowtype of set:RecordType(BIGINTResponseQuarter, BIGINTResponseYear, BIGINT NOT NULLSurveyCategoryID, BIGINTSurveyFormItemID, BIGINT NOTNULL FavRespCount, BIGINT NOTNULL ScaleOptionValueSum, BIGINTNOT NULL TotalRespCount, BIGINTNOT NULL TotalDistinctRespCount)NOT NULL
But when I use theta sketch it shows result without errors