What data is present
QueryLens has 5 PostgreSQL tables and 4 MongoDB collections available for analysis.
Connecting to secure context...
QueryLens PRO
SME portfolio
What data is present
QueryLens has 5 PostgreSQL tables and 4 MongoDB collections available for analysis.
How data is used
Weekly risk and cashflow metrics are computed from regions, sectors, accounts, then corroborated with contextual signals from complaints, service_incidents, risk_alerts, rm_notes.
Execution mode
This workspace is reading from live docker-backed databases in read-only mode.
Postgres facts
connected18 accounts · 1512 daily rows · 192 weekly rows
Mongo context
connected8 contextual documents across 4 collections
Metric manifest
configured1 supported metric with fixed weekly definitions
Tables that power portfolio facts and metric aggregation.
regions
3 rowsReference table of supported SME regions.
id, name
sectors
3 rowsReference table of supported SME sectors.
id, name
accounts
18 rowsAccount master data with region, sector, segment, and baseline thresholds.
id, business_name, region_id, sector_id, segment, low_balance_threshold ...
daily_account_metrics
1,512 rowsDaily account facts including balances, payments, utilization, and stress flags.
account_id, date, week_start, region_id, sector_id, inbound_payments ...
weekly_portfolio_metrics
192 rowsWeekly portfolio, region, sector, and region-sector aggregates with cashflow health components.
week_start, week_end, record_type, region_id, sector_id, region_name ...
Collections used as qualitative context alongside metric shifts.
complaints
2 docsCustomer complaint events tied to regions, sectors, and severity.
id, occurredAt, weekStart, regionId, sectorId, regionName ...
service_incidents
2 docsOperational incidents that can corroborate payment disruption or service stress.
id, occurredAt, weekStart, regionId, sectorId, regionName ...
risk_alerts
2 docsRisk alerts that provide contextual signals around exposure changes.
id, occurredAt, weekStart, regionId, sectorId, regionName ...
rm_notes
2 docsRelationship-manager notes used as qualitative corroborating context.
id, occurredAt, weekStart, regionId, sectorId, regionName ...
A quick sample from weekly portfolio facts used in analysis responses.
| weekStart | recordType | regionName | sectorName | cashflowHealthScore | accountCount |
|---|---|---|---|---|---|
| 2026-01-19 | portfolio | — | — | 100 | 18 |
| 2026-01-19 | region | London & South East | — | 100 | 6 |
| 2026-01-19 | region | Midlands | — | 100 | 6 |
| 2026-01-19 | region | North West | — | 100 | 6 |
| 2026-01-19 | region_sector | London & South East | Hospitality | 68 | 2 |
| 2026-01-19 | region_sector | London & South East | Professional Services | 100 | 2 |
| 2026-01-19 | region_sector | London & South East | Retail | 100 | 2 |
| 2026-01-19 | region_sector | Midlands | Hospitality | 61.7 | 2 |
| 2026-01-19 | region_sector | Midlands | Professional Services | 100 | 2 |
| 2026-01-19 | region_sector | Midlands | Retail | 100 | 2 |
Viewing 1 - 10
A quick sample from contextual event documents used for corroboration.
| collection | occurredAt | severity | regionName | sectorName | summary |
|---|---|---|---|---|---|
| service_incidents | 2026-03-30T07:30:00Z | high | North West | — | Card-settlement delay affected North West merchants. |
| complaints | 2026-03-30T09:15:00Z | high | North West | Hospitality | Hospitality SMEs reported delayed settlement visibility. |
| risk_alerts | 2026-03-30T11:20:00Z | high | North West | Hospitality | Overdraft utilization spiked in hospitality accounts. |
| risk_alerts | 2026-03-30T14:05:00Z | medium | — | Hospitality | Missed-payment risk increased for stressed SMEs. |
| complaints | 2026-03-30T15:40:00Z | medium | North West | Hospitality | Support tickets referenced short-term cash pressure. |
| rm_notes | 2026-03-30T16:25:00Z | medium | North West | Hospitality | Relationship managers heard cashflow concerns after weekend takings. |
| service_incidents | 2026-04-06T08:45:00Z | low | North West | — | Settlement issue resolved and throughput normalized. |
| rm_notes | 2026-04-06T13:10:00Z | low | North West | Hospitality | Hospitality clients expect a partial rebound this week. |