I need to get title, count and percentage from table REPORT_VIEW_PAGE. That works fine.
SELECT DISTINCT TITLE, COUNT(TITLE) AS tot, ROUND(COUNT(TITLE)/(
SELECT COUNT(*) FROM REPORT_VIEW_PAGE), 4) AS per
FROM REPORT_VIEW_PAGE
WHERE DAYCOUNT > '0'
GROUP BY TITLE
ORDER BY TITLE ASC
But if tried to retrieve ID and TYPE like
SELECT DISTINCT TITLE, ID, TYPE, COUNT(TITLE) AS tot, ROUND(COUNT(TITLE)/(
SELECT COUNT(*) FROM REPORT_VIEW_PAGE), 4) AS per
FROM REPORT_VIEW_PAGE
WHERE DAYCOUNT > '0'
GROUP BY TITLE
ORDER BY TITLE ASC
i'm getting the error:
ORA-00979: not a GROUP BY expression 00979. 00000 - "not a GROUP BY expression" *Cause:
*Action: Error at Line: 12 Column: 24
Can anyone help.