Last active
December 17, 2019 08:43
-
-
Save edwardmartinsjr/e0a22d586a3ef6197a3c5604e2b9bd9c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- USERS | |
\copy ( SELECT username as "UserId", name as "Name", email_address as "Email", created_at as "evnt_created_at", created_at as "evnt_updated_at", 'events_' as "events", validated as "Validated" FROM users where created_at between '2019-12-11 02:06' and '2019-12-16 09:09') to '/tmp/users.csv' with csv; | |
-- PROJECT | |
\copy ( SELECT id::varchar as "ProjectId", owner_id::varchar as "OwnerId", created_at as "evnt_created_at", created_at as "evnt_updated_at", 'events_' as "events" FROM projects where created_at between '2019-12-11 02:10' and '2019-12-16 09:15') to '/tmp/projects.csv' with csv; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment