I am trying to create a count column when the same customer contacts regarding an item ("attached_to col" below).
Attempt below shows the total count, but is not a counter. I would like it to show as a counter by date as per screenshot
select
concat(Customer,'-',attached_to) as MergedID,
Customer,
record,
purchasedate,
attached_to,
COUNT(MergedID) OVER (PARTITION BY MergedID) AS Count
from
table 1