Create function to query single profile from database