Hi, I have a table similar to this, and I wanted to select IDs where there are more than one entry and calculate standard deviation of the result grouped by ID. For example, in this case, I need to select ID 12345 and calculate standard deviation of the first 3 results.
I know I can do this by tabulate, but my actual table is very big, more than 1 million rows, tabulate by ID and calculate standard deviation turns out to be extremely time consuming. Most IDs in my actual table have only one row. Is there anyway I can do something like this and then calculate standard deviation for the remaining results group by ID? Thank you for your suggestion!
select where(n rows(grouping columns (:ID))>1)
| ID | result |
| 12345 | 0.3 |
| 12345 | 0.4 |
| 12345 | 0.2 |
| 23456 | 0.5 |
| 34567 | 0.2 |