Hi @Soph75 ,
Yes, it's possible to add a column to your data that would represent the count of open or click activities in the broad log table. You can use a database join operation to combine data from the broad log table with the data from the tracking log. The join operation will allow you to search both tables, and match the rows based on the specified join criteria, in your case, membershipNum and campaignID.
You can use the SQL query as below:
SELECT tl.email, bl.activity, COUNT(*) FROM trackinglog tl JOIN broadlogRcp bl ON tl.membershipNum = bl.membershipNum AND tl.CAMPAIGNID = bl.CAMPAIGNID GROUP BY tl.email, bl.activity
The COUNT function returns the number of occurrences of the activity in the broad log table for each email.
You can use a similar approach in your export workflow to add a column that represents the count of open or click activities in the broad log table. This will allow you to easily identify whether an email was opened or clicked for the first time, or if it was opened or clicked again.
You can also write a SQL query that joins the tracking log and broad log table on the recipient ID and the campaign ID. This way, you can have all the relevant information in one record for each recipient and each campaign.