pre_user_query vs pre_get_posts

The pre_get_posts function is a simple query modifier for general “post” queries. If you’re looking to modify the SQL directly for these query I suggest using the post_clauses hook. This hook passes an array of SQL clauses such as:

$sql['where'] and sql['join']

Here you can inject your own custom SQL into the specific clauses. That being said, if you are truly writing something custom it might be beneficial to circumvent WordPress entirely and just use $wpdb to grab your results.