Columns and types
VARCHAR
- ticker
- symbol
- form
- timing
- source
- extractionMethod
TIMESTAMP
- date
- periodEnd
DOUBLE
- epsActual
- epsEstimate
- epsDifference
- surprisePercent
Showing 12 of 31 recorded rows. The complete table is below.
Current logical schema for lake.sec_quarterly_earnings
Inspect the complete lake.sec_quarterly_earnings schema
Scroll sideways to compare all columns. Select a heading to sort.
| ticker | VARCHAR |
| symbol | VARCHAR |
| date | TIMESTAMP |
| epsActual | DOUBLE |
| epsEstimate | DOUBLE |
| epsDifference | DOUBLE |
| surprisePercent | DOUBLE |
| periodEnd | TIMESTAMP |
| form | VARCHAR |
| timing | VARCHAR |
| source | VARCHAR |
| extractionMethod | VARCHAR |
| originalFileAccepted | BOOLEAN |
| confidence | DOUBLE |
| evidence | VARCHAR |
| statementAccession | VARCHAR |
| statementSourceFilingUrl | VARCHAR |
| filedValueCorrections | VARCHAR |
| rawDocumentManifestKey | VARCHAR |
| promptId | VARCHAR |
| promptVersion | BIGINT |
| promptHash | VARCHAR |
| schemaId | VARCHAR |
| schemaVersion | BIGINT |
| schemaHash | VARCHAR |
| extractedAt | TIMESTAMP |
| cik | BIGINT |
| accession | VARCHAR |
| rawArchiveKey | VARCHAR |
| rawSha256 | VARCHAR |
| sourceFilingUrl | VARCHAR |
No matching rows. Clear the filter to see all records.
Current logical schema for lake.sec_quarterly_earnings
Query lake.sec_quarterly_earnings using the column names and types below. The query validator and engine use this logical catalog; a field absent from an older shard returns typed NULL.
What this table contains
SEC-sourced quarterly EPS: actual, estimate, difference, surprise percent.
Inspect a deduplicated earnings observation
Query example, not executed here. The dates and filters define the proposed research scope; returned rows and current coverage must be checked in your workspace.
The documented latest extraction rule retains one row per ticker and saved calendar date. Read actual and estimated EPS for the same period; NULL estimates cannot establish an earnings beat.
SELECT ticker, date, periodEnd, epsActual, epsEstimate, surprisePercent, accession
FROM lake.sec_quarterly_earnings
WHERE ticker = 'AAPL'
AND date >= TIMESTAMP '2025-01-01'
AND date < TIMESTAMP '2026-09-19'
QUALIFY ROW_NUMBER() OVER (PARTITION BY ticker, CAST(date AS DATE)
ORDER BY extractedAt DESC NULLS LAST, accession DESC) = 1
ORDER BY date DESC
LIMIT 20;Submit the sec_quarterly_earnings example and read back its parts
Run the exact SQL through the Python SDK
Save this page's SQL as query.sql and the runner below as query.py. Use a registered key with lake scope from Developers. The runner submits the displayed sec_quarterly_earnings query once, saves its operation, waits on that same ID, saves the returned manifest and downloads its Parquet parts.
This submission has not been executed for the reference page. Inspect the SQL, dates and resource limits before running it. Reuse the request key only for this identical SQL and limits; use a new key when changing them.
python3 -m pip install nexustrade==1.42.0
export NEXUSTRADE_API_KEY="YOUR_LAKE_SCOPED_KEY"
python3 query.py
import json
from pathlib import Path
from nexustrade import NexusTradeClient
# Save the SQL displayed on this page as query.sql.
sql = Path("query.sql").read_text()
client = NexusTradeClient.from_environment()
operation = client.create_lake_query(
{"query": sql, "limits": {"timeoutSeconds": 30, "maxRows": 50,
"maxResultBytes": 1048576}},
idempotency_key="reference-sec_quarterly_earnings-20261012-v1",
)
Path("query-operation.json").write_text(json.dumps(operation, indent=2))
finished = client.wait_for_lake_query(operation["id"])
if finished["status"] != "completed":
raise RuntimeError(finished)
manifest = client.get_lake_query_manifest(operation["id"])["result"]
Path("query-manifest.json").write_text(json.dumps(manifest, indent=2))
print(json.dumps(manifest, indent=2))
for part in manifest["parts"]:
Path(f"query-{part['part']}.parquet").write_bytes(
client.download_lake_query_part(operation["id"], part["part"], max_bytes=1048576)
)
Coverage and timing
Inspect source coverage and timing before using the rows
SEC-sourced quarterly EPS: actual, estimate, difference, surprise percent.
SEC earnings / EPS rows. The natural key includes `accession`, so dedup before aggregating: `QUALIFY ROW_NUMBER() OVER (PARTITION BY ticker, cast(date as date) ORDER BY extractedAt DESC NULLS LAST, accession DESC) = 1`.
No comments yet.