Manual database extraction - hot to get the visits with only 2 actions

Hi, I have to extract from the database the visits with only 2 actions.

The trouble is that for almost each row the value of matomo_log_visit.visit_total_actions doesn’t match the number of rows of the corresponding idvisit in the matomo_log_link_visit_action table.

I really don’t understand why. Do you guys have any clue about that?

Hi @Marco_Sciamanna
In case of difference, can you check the type of each action? (thanks to log_action.type and also filled fields like search_cat, idaction_event_category or idaction_content_name…)
There are page views, custom actions, searches, dowloads, outlinks, ecommerce, content impression/interaction, etc.