Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Lets take an example of a table having three columns: City ID(Unique), People, Frequency(to be calculated)
| City ID | People | Frequency |
| 1 | 30 | 2 |
| 2 | 30 | 2 |
| 3 | 45 | 1 |
| 4 | 55 | 3 |
| 5 | 55 | 3 |
| 6 | 55 | 3 |
| 7 | 20 | 1 |
| 8 | 11 | 2 |
| 9 | 11 | 2 |
I want the Frequency column to be populated with count as shown above. How can I acheive this?
Hi,
Try this.
Data:
Load CITY_ID,People From xyz;
Left join(Data)
Load People,Count(People) as Freq resident Data group by People;
Regards,
Kaushik Solanki
Try this
aggr(NODISTINCT Count(People),People)