Extracting users that are in close proximity to infected users via SQL queries