Hello @kawada,
Here ya go:
import "csv"
csvData = "#group,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE
#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,string,string,string,string,string,string,string
#default,_result,,,,,,,,,,,,,,,,,
,result,table,_start,_stop,_time,_value,_field,_measurement,dest_ip,dest_port,event_type,flow_id,host,in_iface,path,proto,src_ip,src_port
,,0,2021-08-11T06:55:53.19789141Z,2021-08-12T06:55:53.19789141Z,2021-08-11T10:36:00Z,Major,alert_metadata_signature_severity_0,suricata-alerts,192.168.0.14,80,alert,1437107460025591,opnsense.home.arpa,re1_vlan742^,/var/log/suricata/eve.json,TCP,111.111.111.111,36766
,,0,2021-08-11T06:55:53.19789141Z,2021-08-12T06:55:53.19789141Z,2021-08-11T16:56:00Z,Major,alert_metadata_signature_severity_0,suricata-alerts,192.168.0.14,80,alert,2166347159271520,opnsense.home.arpa,re1_vlan742^,/var/log/suricata/eve.json,TCP,222.222.222.222,34387
,,0,2021-08-11T06:55:53.19789141Z,2021-08-12T06:55:53.19789141Z,2021-08-11T18:20:00Z,Major,alert_metadata_signature_severity_0,suricata-alerts,192.168.0.14,80,alert,321927463147576,opnsense.home.arpa,re1_vlan742^,/var/log/suricata/eve.json,TCP,110.110.110.110,11751
,,0,2021-08-11T06:55:53.19789141Z,2021-08-12T06:55:53.19789141Z,2021-08-11T23:48:00Z,Major,alert_metadata_signature_severity_0,suricata-alerts,192.168.0.14,80,alert,333555236012237,opnsense.home.arpa,re1_vlan742^,/var/log/suricata/eve.json,TCP,100.100.100.100,13488
,,0,2021-08-11T06:55:53.19789141Z,2021-08-12T06:55:53.19789141Z,2021-08-12T02:56:00Z,Major,alert_metadata_signature_severity_0,suricata-alerts,192.168.0.14,80,alert,334429991280534,opnsense.home.arpa,re1_vlan742^,/var/log/suricata/eve.json,TCP,180.180.180.180,53958
,,0,2021-08-11T06:55:53.19789141Z,2021-08-12T06:55:53.19789141Z,2021-08-12T02:56:00Z,Major,alert_metadata_signature_severity_0,suricata-alerts,192.168.0.14,80,alert,33606186887911,opnsense.home.arpa,re1_vlan742^,/var/log/suricata/eve.json,TCP,180.180.180.180,45018
,,0,2021-08-11T06:55:53.19789141Z,2021-08-12T06:55:53.19789141Z,2021-08-11T07:52:00Z,Minor,alert_metadata_signature_severity_0,suricata-alerts,123.123.123.123,80,alert,1554565580150037,opnsense.home.arpa,re0,/var/log/suricata/eve.json,TCP,150.150.150.150,511"
csv.from(csv: csvData)
|> group(columns: ["_value"])
|> set(key: "Count", value: "my_Count")
|> count(column: "Count")