Affiliates throws errors and doesn't count clicks

We have the same issue reported in this thread:
https://premium.wpmudev.org/forums/topic/affiliate-plugin-database-query-errors
During the chat session, this was confirmed also on the staff member site.