Table: hubspot_company - Query HubSpot Companies using SQL
HubSpot Companies is a resource within HubSpot that represents a collection of individuals who you do business with. Companies in HubSpot are distinct entities, separate from contacts, but they can be associated with multiple contacts. This allows for easy tracking and organization of business interactions.
Table Usage Guide
The hubspot_company
table provides insights into companies within HubSpot. As a sales or marketing professional, explore company-specific details through this table, including company size, industry, and associated contacts. Utilize it to uncover information about companies, such as their primary business details, revenue data, and the relationships with contacts.
Examples
Basic info
Explore the creation and modification dates of companies in your Hubspot account, including whether they've been archived, to assess changes over time and manage your contacts effectively.
select id, created_at, archived, domain, updated_atfrom hubspot_company;
select id, created_at, archived, domain, updated_atfrom hubspot_company;
List all archived companies
Discover the segments that consist of archived companies, allowing you to analyze and understand the historical data associated with these businesses. This can be particularly helpful in assessing business trends and patterns over time.
select id, created_at, archived, domain, updated_atfrom hubspot_companywhere archived;
select id, created_at, archived, domain, updated_atfrom hubspot_companywhere archived = 1;
List publicly traded companies
Explore which companies in your Hubspot database are publicly traded. This can be beneficial for understanding your customer base and identifying potential investment opportunities.
select id, created_at, archived, domain, updated_atfrom hubspot_companywhere is_public;
select id, created_at, archived, domain, updated_atfrom hubspot_companywhere is_public = 1;
List companies located in Delhi
Explore which businesses are based in Delhi. This is particularly useful for market research, competitor analysis, or potential partnership opportunities.
select id, created_at, archived, domain, updated_atfrom hubspot_companywhere state = 'Delhi';
select id, created_at, archived, domain, updated_atfrom hubspot_companywhere state = 'Delhi';
List vendor companies
Explore which companies are classified as vendors within your Hubspot database. This is useful for gaining insights into your vendor relationships and assessing their status.
select id, created_at, archived, domain, updated_atfrom hubspot_companywhere type = 'VENDOR';
select id, created_at, archived, domain, updated_atfrom hubspot_companywhere type = 'VENDOR';
List companies with less than 200 employees
Discover the segments that consist of companies with less than 200 employees. This can be useful in assessing the size and scale of potential business partners or competitors.
select id, created_at, archived, domain, updated_atfrom hubspot_companywhere numberofemployees < '200';
select id, created_at, archived, domain, updated_atfrom hubspot_companywhere numberofemployees < 200;
List IT Services companies
Explore which companies in the Information Technology and Services industry are available. This is useful for identifying potential business partners or competitors in the same industry.
select id, created_at, archived, domain, updated_atfrom hubspot_companywhere industry = 'INFORMATION_TECHNOLOGY_AND_SERVICES';
select id, created_at, archived, domain, updated_atfrom hubspot_companywhere industry = 'INFORMATION_TECHNOLOGY_AND_SERVICES';
List companies created in the last 30 days
Explore which companies have been established within the past month. This can be useful to track new business growth and potential opportunities.
select id, created_at, archived, domain, updated_atfrom hubspot_companywhere created_at > now() - interval '30 days';
select id, created_at, archived, domain, updated_atfrom hubspot_companywhere created_at > datetime('now', '-30 days');
Schema for hubspot_company
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. | |
archived | boolean | = | Indicates whether the company is archived or not. |
archived_at | timestamp with time zone | The timestamp when the company was archived. | |
created_at | timestamp with time zone | The timestamp when the company was created. | |
id | text | = | The unique ID of the company. |
title | text | Title of the resource. | |
updated_at | timestamp with time zone | The timestamp when the company was last updated. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- hubspot
You can pass the configuration to the command with the --config
argument:
steampipe_export_hubspot --config '<your_config>' hubspot_company