Question: dbeaver how to export to csv?
Answer: right click the SQL of the query you want to export.
Execute > Export from query.
Choose the format you want (CSV according to your question)
Review the settings in the next panes when clicking "Next". ... 
Set the folder where the file will be created, and "Finish"