Commit 7c2e9bd9 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[METRICS] export to csv file

parent ea8965c4
select count(*), date_trunc('month', n.date) from nodes n where n.typename = 30 group by 2 ORDER BY 2;
\COPY (SELECT count(*), date_trunc('month', n.date) FROM nodes n WHERE n.typename = 30 GROUP BY 2 ORDER BY 2) TO '/tmp/corpora.csv' (FORMAT csv);
select count(*), date_trunc('month', n.date) from nodes n where n.typename = 9 group by 2 ORDER BY 2;
\COPY (SELECT count(*), date_trunc('month', n.date) from nodes n where n.typename = 9 group by 2 ORDER BY 2) TO '/tmp/graphs.csv' (FORMAT csv);
select count(*), date_trunc('month', n.date) from nodes n where n.typename = 90 group by 2 ORDER BY 2;
\COPY (select count(*), date_trunc('month', n.date) from nodes n where n.typename = 90 group by 2 ORDER BY 2) TO '/tmp/phylos.csv' (FORMAT csv);
select count(*), date_trunc('month', n.date) from nodes n where n.typename = 210 group by 2 ORDER BY 2;
\COPY (select count(*), date_trunc('month', n.date) from nodes n where n.typename = 210 group by 2 ORDER BY 2) TO '/tmp/teams.csv' (FORMAT csv);
......
select count(*), date_trunc('month', a.date_joined) from auth_user a group by 2;
\COPY (select count(*), date_trunc('month', a.date_joined) from auth_user a group by 2) TO '/tmp/users.csv' (FORMAT csv);
......
Markdown is supported
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