company_stats
Compute ONE number over a filtered population of companies — count, sum, avg, median, p25, p75, min or max. Prefer this over listing companies and doing the arithmetic yourself: it is one call instead of dozens, and it is exact. metric: net_turnover_ron, net_profit_ron, employees, sales_per_employee_ron, profit_margin_pct, company_count, age_years. group_by: year, caen, judet, status, founded_year — use group_by='year' with years='2019-2024' to get a time series you can chart. Always report coverage.rows_with_metric alongside the answer: it is routinely about half of coverage.matched_companies, because many companies never filed the figure.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agg | No | avg | |
| cui | No | ||
| caen | No | ||
| year | No | ||
| judet | No | ||
| years | No | ||
| metric | No | net_turnover_ron | |
| status | No | ||
| group_by | No | ||
| caen_query | No | ||
| min_turnover | No | ||
| registered_after | No |