I'm working on Netezza platform and i'm totally new.I have a query as shown below
SELECT *
FROM HIST_admin."$v_hist_successful_queries"
WHERE QUERY LIKE '%WI0PIR_PACKITEM_BREAKOUT_NBS%'
AND
submittime > now() - interval '6 month'
GROUP BY QUERY
when i execute it it is giving the below mentioned error
ERROR [HY000] ERROR: Attribute "$v_hist_successful_queries".NPSID must be GROUPed or used in an aggregate function
but i cant figure out whats the error please help. Thanks in advance.