1. Create a Gift query.
  2. Include the query created in the previous  step in a Gift export on the General tab of the Export set-up.