# Finding Max and Stdev of the raw tags

**URL:** <https://forum.inductiveautomation.com/t/finding-max-and-stdev-of-the-raw-tags/19144>\
**Category:** Ignition\
**Tags:** ignition79, database, scripting\
**Created:** [August 8, 2018, 2:59pm UTC](https://forum.inductiveautomation.com/t/finding-max-and-stdev-of-the-raw-tags/19144 "2018-08-08T14:59:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Khan\_Peace](https://avatars.discourse-cdn.com/v4/letter/k/4af34b/32.png) [@Khan\_Peace](https://forum.inductiveautomation.com/u/Khan_Peace)\
**Post date:** [August 8, 2018, 2:59pm UTC](https://forum.inductiveautomation.com/t/finding-max-and-stdev-of-the-raw-tags/19144/1 "2018-08-08T14:59:14Z")

</div>

Hi,

I have raw tags:

Requirements are:

a) user enters Hours.  
b) Based on hours I get a value of “Max” in those hours and a Value of “St Dev” during the given time period.

Please see image:

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/3/36a36bedd8b1a17c850bfbd7d14a88bd9dbf6831.png)

Database is stored as following schema:

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/1/1a146b484c31881bfb3486c466f4aaba9b1c75cd.png)
