Write SQL and Python, run instantly in your browser, and track your progress.
You are a Security Engineer at Salesforce. The Identity team needs to generate permission level labels based on user roles and seat types. Use apply with axis=1 to evaluate multiple columns per row and determine the appropriate permission level.
| Column Name | Type |
|---|---|
| user_id | int64 |
| org_id | int64 |
| object | |
| full_name | object |
You are a Security Engineer at Salesforce. The Identity team needs to generate permission level labels based on user roles and seat types. Use apply with axis=1 to evaluate multiple columns per row and determine the appropriate permission level.
| Column Name | Type |
|---|---|
| user_id | int64 |
| org_id | int64 |
| object | |
| full_name | object |
| role | object |
| role | object |
| seat_type | object |
| seat_type | object |
| status | object |
| status | object |
| mfa_enabled | int64 |
| mfa_enabled | int64 |
| created_at | object |
| created_at | object |
| last_login | object |
| last_login | object |
| user_id | org_id | full_name | role | seat_type | status | mfa_enabled | created_at | last_login | |
|---|---|---|---|---|---|---|---|---|---|
| 1 | 1 | feng.ferrari@vividdata.app | Feng Ferrari | owner |
| user_id | org_id | full_name | role | seat_type | status | mfa_enabled | created_at | last_login | |
|---|---|---|---|---|---|---|---|---|---|
| 1 | 1 | feng.ferrari@vividdata.app | Feng Ferrari | owner |
| user_id | full_name | role | seat_type | permission_level | has_elevated_access |
|---|---|---|---|---|---|
| 1 | Feng Ferrari | owner | full | Full Control | True |
| 2 | Tao Schneider | viewer | full | Read Only | False |
| 3 | Fang Al-Farsi |
| user_id | full_name | role | seat_type | permission_level | has_elevated_access |
|---|---|---|---|---|---|
| 1 | Feng Ferrari | owner | full | Full Control | True |
| 2 | Tao Schneider | viewer | full | Read Only | False |
| 3 | Fang Al-Farsi |
Showing first 5 of 224 rows.
Showing first 5 of 224 rows.
1. Data Selection:
2. Transformation:
3. Output:
1. Data Selection:
2. Transformation:
3. Output:
| full |
| full |
| active |
| active |
| 1 |
| 1 |
| 2025-07-29 |
| 2025-07-29 |
| 2025-08-31 20:18:24 |
| 2025-08-31 20:18:24 |
| 2 | 1 | tao@vividdata.app | Tao Schneider | viewer | full | invited | 1 | 2025-08-18 |
| 2 | 1 | tao@vividdata.app | Tao Schneider | viewer | full | invited | 1 | 2025-08-18 |
| 3 | 1 | fang.al-farsi@vividdata.app | Fang Al-Farsi | member | full | invited | 0 | 2025-07-18 |
| 3 | 1 | fang.al-farsi@vividdata.app | Fang Al-Farsi | member | full | invited | 0 | 2025-07-18 |
| 4 | 1 | rennakamura@vividdata.app | Ren Nakamura | member | full | deleted | 0 | 2025-06-17 |
| 4 | 1 | rennakamura@vividdata.app | Ren Nakamura | member | full | deleted | 0 | 2025-06-17 |
| 5 | 1 | ychoi@vividdata.app | Yan Choi | admin | read_only | active | 1 | 2025-07-02 |
| 5 | 1 | ychoi@vividdata.app | Yan Choi | admin | read_only | active | 1 | 2025-07-02 |
| member |
| member |
| full |
| full |
| Editor |
| Editor |
| False |
| False |
| 4 | Ren Nakamura | member | full | Editor | False |
| 4 | Ren Nakamura | member | full | Editor | False |
| 5 | Yan Choi | admin | read_only | Full Control | True |
| 5 | Yan Choi | admin | read_only | Full Control | True |