Start a new topic

SQL Function to Count Specific Actions

I'm looking for some assistance/guidance on creating an sql function that will count actions that begin with a certain key.  So, within a date range, if a constituent has 10+ of a specific action recorded, they get one score.  If they have between 5 and 9, they get another score, etc.  

Thank you.

The last line should be the System Record ID without the single quotes, click on the hand icon on the constituent record toolbar to see the system record id.
You also might get an ambiguous column name error, if you do add the table name (actions) to the Count(ID) instances, ie; Count(ACTIONS.ID)

Thank you again.  Your join statements got me going in the right direction.

Login or Signup to post a comment