Commit 5eddc6f3 authored by Emmanuel Raviart's avatar Emmanuel Raviart
Browse files

Add SQL command to export a CSV of all organizations and their relations.

parent 63b46d86
......@@ -149,3 +149,16 @@ npx babel-node --extensions ".ts" -- src/scripts/raw_types_from_ddi_files.ts ../
# Prettify generated TypeScript files:
npm run prettier
```
### Generating a CSV file of all organizations
```sql
COPY (
SELECT name, acronym, relation
FROM organizations
INNER JOIN study_organization_associations
ON organizations.name = study_organization_associations.organization_name
GROUP BY name, acronym, relation
ORDER BY name, relation
) TO '/tmp/organizations.csv' DELIMITER ',' CSV HEADER;
```
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment