question

Maryam H2 avatar image
0 Likes"
Maryam H2 asked Maryam H2 commented

Frequency of the Chart Data

Hi there,

How we can get the frequency of chart data. For example, If we create a calculated table to calculate the maximum "Wait Time for a Location" and the maximum wait time reports XX minutes, how we can get the frequency of that max value? I see in the "Person Statistic Tables> Person Wait Times" the value of wait times aggregated for all locations.


Thanks!

FlexSim 22.0.0
statistics collectorwait timesmax wait time
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Maryam H2 commented

You can do this in a single query.

  1. SELECT [colName], COUNT([colName]) FROM tableName GROUP BY [colName] ORDER BY [colName] DESC

will return a table with the values from the specified column in descending order next to the number of how often that value appears in the table. If you only want to see the highest value (which would always be in the first row) you can add "LIMIT 1" to the end of the query.

· 12
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.