# View: country_ranks_for_bi_accounting

**View Name:** country_rank_bi_accounting_by_revenue_selected_months
**Table Source:** `Derived Table (Custom SQL)`
**File Path:** `country_ranks_for_bi_accounting.view.lkml`

## Overview

- **File Size:** 3838 bytes
- **Lines of Code:** 114
- **Dimensions:** 4
- **Measures:** 0
- **Dimension Groups:** 0
- **Filters:** 11

## Dimensions

| Name | Type |
|------|------|
| `country_code_ranking` | string |
| `country_total_net_for_selected_months` | number |
| `country_total_units_for_selected_months` | number |
| `country_rank_for_selected_months` | number |

## Filters

- `rank_date_filter`
- `rank_isrc_filter`
- `rank_upc_filter`
- `rank_labelid_filter`
- `rank_artistid_filter`
- `rank_storeid_filter`
- `rank_genre_filter`
- `rank_country_code_filter`
- `rank_continent_filter`
- `rank_region_group_filter`
- `rank_transac_type_abbr_filter`

## Derived Table

```sql
sql: select
        country_code
      , sum(client_net_receipt_usd) as country_total_net_for_selected_months
      , sum(units) as country_total_units_for_selected_months
      , rank() over (order by sum(client_net_receipt_usd) desc) as country_rank_for_selected_months
      from prod.bi.accounting ACC
      where {% condition rank_date_filter %
```

