Group by data in data table using Kibana

How will i group by data in data table using kibana?

Also, is it possible to to check condition between two fields like field1 > field2 and then taking the sum of them.

Thank you

Not sure exactly what you're asking, but perhaps you are looking for a Terms aggregation (see below).

For conditionals, you'd have to either do this outside of Kibana and index the value as a separate fields, or try using scripted fields in Kibana for that.