select username, dob_day from xf_user
inner join xf_user_profile on xf_user_profile.user_id = xf_user.user_id
inner join xf_user_option on xf_user_option.user_id = xf_user.user_id
where dob_month = 10 and is_banned = 0 and user_state = 'valid' and show_dob_year = 1
order by dob_day asc;