# Count day over xTemp | store it | Telegram it

**URL:** <https://discourse.nodered.org/t/count-day-over-xtemp-store-it-telegram-it/47403>\
**Category:** General\
**Created:** [20 June 2021 15:11 UTC](https://discourse.nodered.org/t/count-day-over-xtemp-store-it-telegram-it/47403 "2021-06-20T15:11:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vikozo](https://avatars.discourse-cdn.com/v4/letter/v/858c86/32.png) [@vikozo](https://discourse.nodered.org/u/vikozo)\
**Post date:** [20 June 2021 15:11 UTC](https://discourse.nodered.org/t/count-day-over-xtemp-store-it-telegram-it/47403/1 "2021-06-20T15:11:33Z")

</div>

Hello

i would like to count days this happen.  
The Part to get the data und send a basic Telegram works, but i would like to have more, but don't know what path to go. This are two example.

Tn20GT = Tropennacht = Tropical night  
beween 18:00 - 06:00 Tmin ≥ 20 °C

TX25GE = Sommertag = Summer Day  
Tmax ≥ 25 °C

Storage in a InfluxDB 1.8 for the longer future!

sending Telegram like

## TX25GE = Sommertag = Summer Day Tmax ≥ 25 °C

2021 (3 Days) 12.06 / 20.06  
2020 (4 Days) 27.06 / 25.08  
2019 (7 Days) 15.06 / 15.08  
year; how many time happens; first in the year / last in the year

so at the end i would get my own statistics about wheater.

have a nice day  
vinc

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [20 June 2021 15:58 UTC](https://discourse.nodered.org/t/count-day-over-xtemp-store-it-telegram-it/47403/2 "2021-06-20T15:58:21Z")

</div>

Are you already ~~sorting~~ storing the raw data in influx? If so then you should be able to get the answer by querying the data in influx.

**[Edit]** Corrected typo.

---

<div class="post-metadata">

**Author:** ![vikozo](https://avatars.discourse-cdn.com/v4/letter/v/858c86/32.png) [@vikozo](https://discourse.nodered.org/u/vikozo)\
**Post date:** [20 June 2021 21:49 UTC](https://discourse.nodered.org/t/count-day-over-xtemp-store-it-telegram-it/47403/3 "2021-06-20T21:49:50Z")

</div>

@Colin  
thanks for your feedback!  
yes i do have some datas aproximatly 6 Month - i wish to copy them into a new dp but can't find information how to do it.

influxDB 1.8x

source would be  
DB-Name db433Mhz  
measurements average

neue DB  
DB-Name spez\_temp\_day

into a new measurement temperatur  
no measurements now

thanks for a feedback  
vinc

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [21 June 2021 07:58 UTC](https://discourse.nodered.org/t/count-day-over-xtemp-store-it-telegram-it/47403/4 "2021-06-21T07:58:59Z")

</div>

Sorry, I don't understand what you are asking.

If I were trying to solve the question you originally asked I would save all the temperature samples into influx with each sample including a tag indicating whether day or night (in order to simplify the query later). Then you can query for the data you want by grouping over 1 day intervals, selecting the maximum of daily day temperatures and the minimum of daily night temperatures, and use the influx COUNT function to determine the answer. Query separately for each year to get the specific answers you want.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [20 August 2021 07:59 UTC](https://discourse.nodered.org/t/count-day-over-xtemp-store-it-telegram-it/47403/5 "2021-08-20T07:59:14Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
