# View: KNR_Performer_Run_Reported_Contributor_Names

**View Name:** KNR_Performer_Run_Reported_Contributor_Names
**Table Source:** `Derived from: Prod.Accounting_Run_Results_Nr_Staging, Prod.Contract_Transaction_Nr_Staging, Prod.Dim_Transactiontype, Prod.Stmt_Db_Sales_Nr, Prod_Royalty_Accounting_Royalty_Accounting.Account + 3 more`
**File Path:** `views/KNR_Performer_Run_Reported_Contributor_Names.view.lkml`

## Overview

- **File Size:** 1869 bytes
- **Lines of Code:** 45
- **Dimensions:** 4
- **Measures:** 0
- **Dimension Groups:** 0
- **Filters:** 0

## Dimensions

| Name | Type |
|------|------|
| `Batch_ID` | string |
| `Contributor_Name` | string |
| `Contributor_ID` | string |
| `Reported_Contributor_Name` | string |

## SQL Comments

- contract
- account
- contract conditions
- contrbiutor

## Derived Table

```sql
sql:
     select distinct
    txn.batch_id,
    txn.contributor_id,
    nc.name,
    txn.contributor_name slaughterhouse_name
-- sales
from royalty_accounting.prod.accounting_run_results_nr_staging as arr
join royalty_accounting.prod.stmt_db_sales_nr as txn on arr.txn_id = txn.stmt_db_sales_nr_txn_id
-- contract
join royalty_accounting.prod.contract_transaction_nr_staging as cts on arr.txn_id = cts.txn_id and cts.accounting_run_id=arr.accounting_run_id
join orchard_app_reporting_v2.prod_royalty_accounting_royalty_accounting.contract as c on cts.contract_id = c.contract_id
join orchard_app_reporting_v2.prod_royalty_accounting_royalty_accounting.run_controller_contract rcc
-- account
join orchard_app_reporting_v2.prod_royalty_accounting_royalty_accounting.account as a on cts.account_id = a.account_id
join orchard_app_reporting_v2.prod_royalty_accounting_royalty_accounting.account_payment_term as apt on a.account_id = apt.account_id
-- contract conditions
join facts.prod.dim_transactiontype as t on txn.transaction_type = t.transactiontypeabbr
left join orchard_app_reporting_v2.art_relations_prod_art_relations.customer_master_master cmm on cmm.customer_master_master_id=txn.store_id
left join orchard_app_reporting_v2.art_relations_prod_art_relations.country cn on cn.id=txn.country_id
-- contrbiutor
left join facts.prod.nr_contributor nc on nc.id=txn.contributor_id

where true            ;;
```

