1. Click Administration > Export > Add
  2. Give your export process a name
  3. Make sure the export type is Ad-hoc query
  4. Add the query you're trying to export to the Ad-hoc query field. You can search for your query by clicking on the magnifying glass next to the ad-hoc query textbox.
  5. After you have selected your query click the save button
  6. On the Exports screen click on the name of your export
  7. Click start process. After the process finishes click on the download output button to get your results.