Overview
All benchmark data is computed from live PostgreSQL aggregation queries against thenil_deals table. No hardcoded values, no fake data.
Three Comparison Scopes
| Scope | Definition | SQL Filter |
|---|---|---|
| Your School | Only your university’s deals | university_id = :current_user_university |
| Conference | All universities in your conference | university_id IN (SELECT id FROM universities WHERE conference_id = :your_conf) |
| Peer Group | Universities in your custom peer conferences | university_id IN (SELECT id FROM universities WHERE conference_id IN :peer_conf_ids) |
Core Aggregation Helper
The_agg() function runs a single SQL query with all filters applied:
Percentile Calculations
The grid endpoint uses PostgreSQL’s nativepercentile_cont() function:
Filter Support
Every endpoint accepts and respects these filters:| Filter | Parameter | How Applied |
|---|---|---|
| Sport | sport_id | WHERE NilDeal.sport_id = :id |
| Position | position_id | WHERE NilDeal.position_id = :id |
| Eligibility Year | eligibility_year | JOIN Athlete WHERE eligibility_year = :year |
| Comp Type | comp_type | WHERE NilDeal.compensation_type = :type |
Data Anonymization
Per the product spec, benchmarks anonymize cross-institution data:- Conference and peer data show only aggregated statistics (AVG, SUM, percentiles)
- Individual university names, athlete names, and deal details are never exposed in benchmark responses
- Only the user’s own school data is identifiable