added experimental query to export tables to csv. can be usefull later