Data

From AwesomeWiki

Snippets of code, etc for pulling data from the database.

All projects with chapter info and funding details (used for the Summit data analysis)

rails runner  "Project.joins(:chapter).pluck(:id, Arel.sql('TO_CHAR(created_at, \'YYYY-MM-DD\"T\"HH24:MI:SS\"Z\"\')'), 'chapters.name', Arel.sql('CASE WHEN chapters.inactive_at IS NULL THEN \'Active\' ELSE \'Inactive\' END'), Arel.sql('TO_CHAR(funded_on, \'YYYY-MM-DD\')'), Arel.sql('TO_CHAR(funded_on, \'YYYY-MM\')')).each { |p| puts p.join(%Q(\t)) }"