# View: dt_orchgo_new_users

**View Name:** dt_orchgo_new_users
**Table Source:** `Derived from: Art_Relations_Prod_Art_Relations.Country, Mobile_Orchard_Prod_Android.Identifies, Orchard_App_Reporting_V2, Orchard_App_Reporting_V2.Art_Relations_Prod_Art_Relations, Segment_Events + 1 more`
**File Path:** `dt_orchgo_new_users.view.lkml`

## Overview

- **File Size:** 4773 bytes
- **Lines of Code:** 131
- **Dimensions:** 9
- **Measures:** 1
- **Dimension Groups:** 0
- **Filters:** 0

## Dimensions

| Name | Type |
|------|------|
| `user_id` | string |
| `label_name` | string |
| `label_id` | string |
| `first_name` | string |
| `last_name` | string |
| `name` | string |
| `email` | string |
| `user_types` | string |
| `user_country` | string |

## Measures

| Name | Type |
|------|------|
| `user_event_count_sum` | sum |

## Derived Table

```sql
sql:
      select
        i.id as user_id,
        coalesce(min(v_direct.company), min(v_subaccount.company), min(v_participant.company)) as label_name,
        v_direct.vendor_id as label_id,
        i.first_name,
        i.last_name,
        i.name,
        i.email,
        i.user_types,
        min(user_events.user_country) as user_country,
        sum(user_events.user_event_count) as user_event_count_sum
    from facts.prod.identity i
    inner join

    (
      select
        i.id,
        count(*) as user_event_count,
        min(c.name) as user_country, min(android.profile_id) as profile_id
      from segment_events.mobile_orchard_prod_android.identifies android
      JOIN facts.prod.identity i on i.id = android.user_id
      inner join orchard_app_reporting_v2.art_relations_prod_art_relations.country c on c.country_code = substring(android.context_locale, 4, 2)
      WHERE to_date(received_at) between {% parameter filter_lower_date %
```

