Question Teresa Toler · Nov 7, 2017 How to turn GROUP BY into OVER(PARTITION BY I am a newbie to Cache and we are using dBeaver product to query against Cache tables. I have the following query which does a GROUP BY to aggregate the columns: SELECT PtNumber,cpt4_OVR,CollDateODBC, COUNT(*) FROM site.MGBILL_View WHERE cpt4_OVR IN ('36415', '36416') --AND ChargeFlags = '0' AND CollDateODBC > DATEADD(DAY,-45,CURRENT_DATE) GROUP BY PtNumber,cpt4_OVR, CollDateODBC HAVING count(*) > 2 -This returns a count of 3 for each patient (aggregated) #Caché 0 2 0 1.1K