lerg_complex_query
Run complex LERG queries with JOINs across multiple tables to combine NPA-NXX with carrier details for telecom routing analysis.
Instructions
Execute a complex LERG query with JOINs across multiple tables. Supports filter operators: eq, ne, gt, gte, lt, lte, like, in, isnull, isnotnull. Use this when you need to combine data from different LERG tables, such as joining NPA-NXX (lerg_6) with carrier info (lerg_1) via OCN.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | Primary table name (e.g. lerg_6) | |
| fields | No | Fields to return from primary table (e.g. ['npa','nxx','ocn','loc_name']) | |
| filters | Yes | Filter conditions (e.g. [{field:'npa', operator:'eq', value:720}]) | |
| join | No | Optional JOIN clause | |
| limit | No | Max results (default 100) | |
| offset | No | Pagination offset (default 0) |