There was an error while loading. Please reload this page.
1 parent 62850d4 commit 41c1a21Copy full SHA for 41c1a21
bigfunctions/transform_numeric/nps.yaml
@@ -1,15 +1,15 @@
1
type: aggregate_function_sql
2
author: Paul Marcombes
3
description: |
4
- Returns the NPS (Net Promoter Score)
+ Returns the NPS (Net Promoter Score)
5
of `rating` (which represents customer satisfaction between 0 and 10):
6
7
```sql
8
NPS = "% promoters" - "% detractors"
9
```
10
11
where:
12
-
+
13
- `"% promoters" = 100 * countif(rating >= 9) / count(*)`
14
- `"% detractors" = 100 * countif(rating <= 6) / count(*)`
15
arguments:
0 commit comments