-- Fetch all the Accounts belonging to the Apollo
-- account of a particular user.
SELECT *
FROM fiber.apollo_account
WHERE account_id = '{user.apollo_id}'
-- Fetch all the Accounts belonging to the Apollo
-- account of a particular user.
SELECT *
FROM fiber.apollo_account
WHERE account_id = '{user.apollo_id}'
Code
CREATE TABLE fiber.apollo_account (
id TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE,
updated_at TIMESTAMP WITH TIME ZONE,
account_id TEXT,
name TEXT,
website_url TEXT,
blog_url TEXT,
angellist_url TEXT,
linkedin_url TEXT,
twitter_url TEXT,
facebook_url TEXT,
languages TEXT[],
alexa_ranking DOUBLE PRECISION,
phone TEXT,
linkedin_uid TEXT,
publicly_traded_symbol TEXT,
publicly_traded_exchange TEXT,
logo_url TEXT,
crunchbase_url TEXT,
primary_domain TEXT,
starred_by_user_ids TEXT[],
persona_counts JSONB,
market_cap TEXT,
organization_raw_address TEXT,
organization_city TEXT,
organization_street_address TEXT,
organization_state TEXT,
organization_country TEXT,
organization_postal_code TEXT,
suggest_location_enrichment JSONB,
domain TEXT,
team_id TEXT,
typed_custom_fields JSONB,
organization_id TEXT,
account_stage_id TEXT,
source TEXT,
original_source TEXT,
owner_id TEXT,
phone_status TEXT,
hubspot_id TEXT,
salesforce_id TEXT,
salesforce_owner_id TEXT,
parent_account_id TEXT,
sanitized_phone TEXT,
account_playbook_statuses TEXT[],
existence_level TEXT,
label_ids TEXT[],
modality TEXT,
salesforce_record_url TEXT,
contact_emailer_campaign_ids TEXT[],
contact_campaign_status_tally JSONB,
num_contacts INT,
last_activity_date TEXT
)
CREATE TABLE fiber.apollo_account (
id TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE,
updated_at TIMESTAMP WITH TIME ZONE,
account_id TEXT,
name TEXT,
website_url TEXT,
blog_url TEXT,
angellist_url TEXT,
linkedin_url TEXT,
twitter_url TEXT,
facebook_url TEXT,
languages TEXT[],
alexa_ranking DOUBLE PRECISION,
phone TEXT,
linkedin_uid TEXT,
publicly_traded_symbol TEXT,
publicly_traded_exchange TEXT,
logo_url TEXT,
crunchbase_url TEXT,
primary_domain TEXT,
starred_by_user_ids TEXT[],
persona_counts JSONB,
market_cap TEXT,
organization_raw_address TEXT,
organization_city TEXT,
organization_street_address TEXT,
organization_state TEXT,
organization_country TEXT,
organization_postal_code TEXT,
suggest_location_enrichment JSONB,
domain TEXT,
team_id TEXT,
typed_custom_fields JSONB,
organization_id TEXT,
account_stage_id TEXT,
source TEXT,
original_source TEXT,
owner_id TEXT,
phone_status TEXT,
hubspot_id TEXT,
salesforce_id TEXT,
salesforce_owner_id TEXT,
parent_account_id TEXT,
sanitized_phone TEXT,
account_playbook_statuses TEXT[],
existence_level TEXT,
label_ids TEXT[],
modality TEXT,
salesforce_record_url TEXT,
contact_emailer_campaign_ids TEXT[],
contact_campaign_status_tally JSONB,
num_contacts INT,
last_activity_date TEXT
)
Model definition