I want a selection result where I get per day results. Im counting errors, and have the following non-working statement:
SELECT message, time, personid, count(*)
FROM errorlog
WHERE time BETWEEN TO_DATE(todays date - 10 days) AND TO_DATE(todays date) AND SUBSTR(message,0,3) = 'ERR'
GROUP BY DAY(time), personid, message
ORDER BY 4
When I run this it says “DAY”: invalid indentifier.
it should be a column name after GROUP BY.
TRY: