I would like to write the script that need to show "Sum of Max value" .
Here, you can see same IP has opened two session and view the page.The value is accumulated [incremental] one. So I have to take max value of each session and sum the output.
Hence, I will get an exact and total amount used per IP.
How can I implement this in scripted field in kibana4