Skip to main content
Compare publicly traded competitors using revenue figures from SEC EDGAR 10-K and 10-Q filings. These reports include financial results and reporting periods that help you analyze competitors’ performance. In this tutorial, you’ll use Dataville with Claude to find each competitor’s SEC filings, maintain a company list in Google Sheets, and query the results with SQL in Data Studio. The example compares Home Depot, Lowe’s, and Floor & Decor. You can rerun the comparison when your list changes. The demo video follows this guide from the prompt in Claude to the comparison table in Data Studio. At the end, it opens the Request tab under Results to show the same query as a cURL, Python, or JavaScript request.

Before you start

You’ll need:
  • Claude on the web or desktop with Dataville added as a connector. See Quickstart: Claude for the setup.
  • A Google account, for Google Sheets.

Build an SEC filings competitor comparison

Data Studio’s edgar table has a company’s filings once someone has looked the company up, so the first step happens in Claude.
1

Find competitors' SEC EDGAR filings in Claude

Turn on the Dataville connector in a new chat and ask for every competitor by its ticker:
Claude’s response lists a “Search a Dataville data source” step for each ticker, and the answer gives each company’s filer name, such as LOWES COMPANIES INC. Search by ticker when you can. A name with an apostrophe, such as Lowe’s, can match another company’s filing instead.If SEC EDGAR is unavailable, Dataville answers from its stored copy and the result says the data may be out of date. See Response format to learn more about stale results.
2

Copy the competitor list template

The template is a Google Sheet with a tab named Competitors. It lists the example competitors by their filer names in a company column.

Competitors template

Make your own copy of the template in Google Sheets.
Google asks whether to make a copy. Click Make a copy, and your copy opens in Google Sheets with these rows:
3

Connect the Google Sheets to Dataville

On the Data Library page, open the Your Data tab and click Connect Sheet. Choose your spreadsheet in Google’s file picker, then click Competitors when Dataville asks which tab to connect. If the card says “Connect your Google account to add sheets.”, clicking it asks you to sign in to Google first. If Dataville shows “No Google account is connected for this user.”, click Reconnect.
The Data Library page in the Dataville dashboard with the Your Data filter selected: a Connect Sheet card above the list of connected sheets.
Once the first sync finishes, your sheet appears as a card under Your Data, and you can query it as a table named my_competitors.Dataville re-reads the sheet every six hours. If you change the list and want the table updated sooner, select the sheet under Your Data and click Sync now. To learn more about syncing, see Connected data.
4

Query SEC 10-K and 10-Q revenue in Data Studio

Open Data Studio. Your Competitors sheet appears in the Sources list, and Data Studio includes it in any query that names my_competitors.
Data Studio: a Sources list of tables with checkboxes beside a Query panel, with the comparison query in the SQL editor and a Run button.
In the Query panel, replace the query in the SQL editor with this one and click Run. Leave the ticked sources as they are, because changing them replaces the query in the editor. The query returns each competitor’s most recent 10-K or 10-Q, with the revenue it reports:
regexp_extract reads the revenue and its dates out of the filing’s text, and QUALIFY keeps the first row for each company. The rows appear under Results. For the example competitors, they are these, shown without the document_url column:Each figure covers the first six months of that company’s fiscal year, and the fiscal years start on different dates. A company whose most recent report is a 10-K shows a full year, so check revenue_period before you compare two figures. The document_url column links each row to its filing on sec.gov, so you can cite it in your report.If a competitor is missing, compare its name in the sheet with the filer name in Claude’s answer. If the names match, ask Claude about the company again and run the query again.
5

Optional: Compare your own client's competitors

To profile a real client, look up its competitors by ticker with the prompt from the first step. Then replace the rows in your Competitors tab with the filer names from Claude’s answer. The comparison table matches your sheet to the filings by name, and only an exact match counts.Under Your Data on the Data Library page, select the sheet and click Sync now, then run the comparison query again.

Next steps: Query SEC filings from codeQuery SEC filings from code

You can run the same query from code, or from DuckDB on your own machine.

Run a SQL SELECT across the datasets

Run the same query from the API by passing your sheet’s id.

Query from DuckDB

Run the query from DuckDB and read the result as Parquet or CSV.