Analyze table schemas for insights
User
easymanage get and study all table schema and suggest what insights and trends can be derived from tables
Cursor
I'll fetch the full database schema first so I can map relationships and then outline the insights and trends you can derive.
I fetched the full schema. I’ll map key entities/relationships and then list high‑value insights you can derive.
Core entities and relationships
- Accounts (
AccountsVw
)- Attributes: type, industry, revenue, employees, location, website, parentId, campaignId
- Links:
- to Contacts via
AccountsContactsVw
(many‑to‑many) - to Opportunities via
AccountsOpportunitiesVw
(many‑to‑many) - to Quotes via
AosQuotesVw.billingAccountId
- to Contacts via
- Contacts (
ContactsVw
)- Attributes: names, phones, addresses, title, department, GDPR fields, leadSource, reportsToId, birthdate, campaignId
- Links:
- to Accounts via
AccountsContactsVw
- to Cases via
ContactsCasesVw
- to Case updates via
AopCaseUpdatesVw.contactId
- to Quotes via
AosQuotesVw.billingContactId
- to Accounts via
- Opportunities (
OpportunitiesVw
)- Attributes: opportunityType, leadSource, amount, dateClosed, salesStage, probability, campaignId, currency
- Links:
- to Accounts via
AccountsOpportunitiesVw
- to Quotes via
AosQuotesVw.opportunityId
- to Accounts via
- Quotes (
AosQuotesVw
)- Attributes: billing/shipping, expiration, number, totals, taxes, shipping, currency
- Links:
- to Opportunities via
opportunityId
- to Accounts via
billingAccountId
- to Contacts via
billingContactId
- to Quote line items via
AosProductsQuotesVw.parentId
(withparentType
)
- to Opportunities via
- Quote line items (
AosProductsQuotesVw
)- Attributes: productId, qty, list/unit/discount/total prices, VAT, currency, groupId
- Links:
- to Quotes via
parentId
(andparentType
)
- to Quotes via
- Cases (
CasesVw
)- Attributes: caseNumber, type, status, priority, resolution, accountId, state
- Links:
- to Accounts via
accountId
- to Contacts via
ContactsCasesVw
- to Case updates via
AopCaseUpdatesVw.caseId
- to Accounts via
- Case updates (
AopCaseUpdatesVw
)- Attributes: caseId, contactId, internal flag
- Bridge tables
AccountsContactsVw
(accountId, contactId)AccountsOpportunitiesVw
(accountId, opportunityId)ContactsCasesVw
(contactId, caseId)
High‑value insights and trends to derive
- Sales pipeline and conversion
- Stage distribution, velocity: avg days between stages, cycle time by segment
- Win rates and conversion by leadSource, campaignId, industry, account tier
- Forecast accuracy: compare
probability*amount
to realized closed‑won amount - Slippage: opportunities with
dateClosed
push counts and causes (nextStep text mining)
- Revenue and bookings
- Booked revenue by month/quarter from opportunities (closed‑won) and quotes (accepted)
- Multi‑currency normalization via
amountUsdollar
and quote USD fields - Campaign ROI: opportunities/quotes amount attributed to
campaignId
vs cost (if available)
- Pricing and discounting
- Discount rate distributions from
AosProductsQuotesVw
(list vs unit vs total) - Approval issues: analyze
AosQuotesVw.approvalIssue
vs discount thresholds - Margin proxy: unit price − cost price; margin by product, segment, rep
- Discount rate distributions from
- Product mix and attach
- Top products by revenue/qty; attach rates across opportunities/accounts
- Bundles:
groupId
patterns revealing commonly co‑sold items - Price sensitivity: correlation of discount to close rate/time
- Account segmentation and health
- Revenue and pipeline by
industry
,accountType
,employees
, parent hierarchies - Geographic trends from billing/shipping address fields
- Account depth: number of contacts, opportunities, quotes, and cases per account
- Revenue and pipeline by
- Contact engagement
- Buying roles:
title/department
patterns among deals won vs lost - GDPR readiness:
lawfulBasis
coverage anddateReviewed
recency - Phone/email completeness and do-not-call coverage by segment
- Buying roles:
- Quote funnel
- Quote creation → acceptance conversion; time to expiration; expiration‑related loss
- Leakage between opportunity and quote stages; multiple quotes per opportunity analysis
- Support and retention
- Case volume/severity trends by account/industry/region
- SLA metrics: time to first update/closure using
AopCaseUpdatesVw.dateEntered
andCasesVw.dateModified
- Internal vs external updates mix (
internal
) and impact on resolution times - Case‑to‑churn proxies: rising cases per account preceding lower pipeline or close rates
- Operational performance
- Rep workload:
assignedUserId
spread across opportunities, quotes, cases - Data quality KPIs: missing
leadSource
, address completeness, orphaned records, delete flags
- Rep workload:
- Compliance and audit
- Change activity: using
dateEntered
/dateModified
for audit heatmaps - GDPR: lawful basis/source coverage by region
- Change activity: using
Example analytical queries to start
- Win rate by lead source and industry
- Join
OpportunitiesVw
withAccountsOpportunitiesVw
→AccountsVw
; group byleadSource
,industry
,salesStage ∈ {Closed Won, Closed Lost}
.
- Join
- Discount impact on conversion
AosProductsQuotesVw
aggregated to quote level; joinAosQuotesVw
→OpportunitiesVw
outcome; model win vs discount rate.
- Product attach bundles
- Within
AosProductsQuotesVw
, compute frequent itemsets byparentId
andgroupId
.
- Within
- SLA performance
- For each
CasesVw
, compute time to firstAopCaseUpdatesVw
entry and time to closure; segment bypriority
andaccountId
.
- For each
- Forecast bias
- Compare monthly sum of
amountUsdollar * probability
vs actual closed‑wonamountUsdollar
.
- Compare monthly sum of
- Campaign attribution
- Use
campaignId
acrossOpportunitiesVw
,ContactsVw
,AccountsVw
to estimate multi‑touch or last‑touch models.
- Use
Suggested dashboards
- Executive sales: bookings, pipeline by stage, win rate, forecast vs actual, top opportunities.
- Pricing & margin: discount heatmap, margin by product, approvals, price realization trends.
- Product analytics: revenue by product, attach bundles, cross‑sell matrix.
- Account health: revenue, pipeline, support cases, contact coverage, data quality score.
- Support ops: case volume, SLA, backlog aging, internal vs external updates.
Data quality checks to implement early
Validate currency normalization fields; ensure
parentType
for line items is “AOS_Quotes”.Enforce referential integrity across bridge tables; detect deleted vs active records.
Normalize addresses and phone formats; deduplicate contacts; fill missing
leadSource
.I’ve reviewed your schema relationships; next I can propose concrete SQLs or build a quick BI model (e.g., dbt star schemas) if you share your warehouse target.
Key takeaways:
- You can quantify end‑to‑end funnel from campaign/contact → opportunity → quote → product lines → revenue.
- Strong levers include discount discipline, product bundling, and SLA adherence, all measurable from the current tables.