SELECT
xf_user.user_id,
xf_user.username,
xf_user_field_value.field_value,
xf_user_profile.dob_day,
xf_user_profile.dob_month,
xf_user_profile.dob_year
FROM xf_user
LEFT JOIN xf_user_field_value ON xf_user.user_id = xf_user_field_value.user_id
LEFT JOIN xf_user_profile ON xf_user.user_id = xf_user_profile.user_id
WHERE xf_user_field_value.field_id='XXXXX'
ORDER BY xf_user.user_id ASC