-- Fetch all the Prospects belonging to the Outreach
-- account of a particular user.
SELECT *
FROM fiber.outreach_prospect
WHERE account_id = '{user.outreach_id}'
-- Fetch all the Prospects belonging to the Outreach
-- account of a particular user.
SELECT *
FROM fiber.outreach_prospect
WHERE account_id = '{user.outreach_id}'
Code
CREATE TABLE fiber.outreach_prospect (
id TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE,
updated_at TIMESTAMP WITH TIME ZONE,
account_id TEXT,
added_at TEXT,
address_city TEXT,
address_country TEXT,
address_state TEXT,
address_street TEXT,
address_street_2 TEXT,
address_zip TEXT,
angel_list_url TEXT,
available_at TEXT,
call_opted_out BOOLEAN,
calls_opt_status TEXT,
calls_opted_at TEXT,
campaign_name TEXT,
click_count INT,
company TEXT,
date_of_birth TEXT,
degree TEXT,
email_opted_out BOOLEAN,
emails TEXT[],
emails_opt_status TEXT,
emails_opted_at TEXT,
engaged_at TEXT,
engaged_score INT,
event_name TEXT,
external_id TEXT,
external_owner TEXT,
external_source TEXT,
facebook_url TEXT,
first_name TEXT,
gender TEXT,
github_url TEXT,
github_username TEXT,
google_plus_url TEXT,
graduation_date TEXT,
home_phones TEXT[],
job_start_date TEXT,
last_name TEXT,
linked_in_connections INT,
linked_in_id TEXT,
linked_in_slug TEXT,
linked_in_url TEXT,
middle_name TEXT,
mobile_phones TEXT[],
name TEXT,
nickname TEXT,
occupation TEXT,
open_count INT,
opted_out BOOLEAN,
opted_out_at TEXT,
other_phones TEXT[],
personal_note_1 TEXT,
personal_note_2 TEXT,
preferred_contact TEXT,
quora_url TEXT,
region TEXT,
reply_count INT,
school TEXT,
score DOUBLE PRECISION,
sharing_team_id TEXT,
source TEXT,
specialties TEXT,
stack_overflow_id TEXT,
stack_overflow_url TEXT,
tags TEXT[],
time_zone TEXT,
time_zone_iana TEXT,
time_zone_inferred TEXT,
title TEXT,
touched_at TEXT,
trashed_at TEXT,
twitter_url TEXT,
twitter_username TEXT,
updated_at TEXT,
voip_phones TEXT[],
website_url_1 TEXT,
website_url_2 TEXT,
website_url_3 TEXT,
work_phones TEXT[]
)
CREATE TABLE fiber.outreach_prospect (
id TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE,
updated_at TIMESTAMP WITH TIME ZONE,
account_id TEXT,
added_at TEXT,
address_city TEXT,
address_country TEXT,
address_state TEXT,
address_street TEXT,
address_street_2 TEXT,
address_zip TEXT,
angel_list_url TEXT,
available_at TEXT,
call_opted_out BOOLEAN,
calls_opt_status TEXT,
calls_opted_at TEXT,
campaign_name TEXT,
click_count INT,
company TEXT,
date_of_birth TEXT,
degree TEXT,
email_opted_out BOOLEAN,
emails TEXT[],
emails_opt_status TEXT,
emails_opted_at TEXT,
engaged_at TEXT,
engaged_score INT,
event_name TEXT,
external_id TEXT,
external_owner TEXT,
external_source TEXT,
facebook_url TEXT,
first_name TEXT,
gender TEXT,
github_url TEXT,
github_username TEXT,
google_plus_url TEXT,
graduation_date TEXT,
home_phones TEXT[],
job_start_date TEXT,
last_name TEXT,
linked_in_connections INT,
linked_in_id TEXT,
linked_in_slug TEXT,
linked_in_url TEXT,
middle_name TEXT,
mobile_phones TEXT[],
name TEXT,
nickname TEXT,
occupation TEXT,
open_count INT,
opted_out BOOLEAN,
opted_out_at TEXT,
other_phones TEXT[],
personal_note_1 TEXT,
personal_note_2 TEXT,
preferred_contact TEXT,
quora_url TEXT,
region TEXT,
reply_count INT,
school TEXT,
score DOUBLE PRECISION,
sharing_team_id TEXT,
source TEXT,
specialties TEXT,
stack_overflow_id TEXT,
stack_overflow_url TEXT,
tags TEXT[],
time_zone TEXT,
time_zone_iana TEXT,
time_zone_inferred TEXT,
title TEXT,
touched_at TEXT,
trashed_at TEXT,
twitter_url TEXT,
twitter_username TEXT,
updated_at TEXT,
voip_phones TEXT[],
website_url_1 TEXT,
website_url_2 TEXT,
website_url_3 TEXT,
work_phones TEXT[]
)
Model definition