0

I have two tab in sql , TAB1 and TAB2. I want to use ;

  1. last element TAB2 as reference values.

  2. avarage of TAB2 as reference values.

  3. max and min element of TAB2 as ref val.

What i did ----

  • I can take last element of TAB2,average of TAB 2 and max,min val of TAB2 via function node with JS code.

  • I can easily write and read sensor data from sql.

What i need ---

I need compare values which is belong to TAB2 with TAB1. I cant use switch node for comparing 2 different source. What kind of ways i must follow for achievement this goal ?

Update : For example this is from '' X '' Database , TAB2 Table Last value is 3. ID 5.22322

ID      Value
1      0.23123
2      9.33333
3      5.22322

This is From '' Y '' Database, TAB1

ID      Value
1      1.202123
2      3.3033
3      1.2322
  • 1
    "last element of TAB2" -- what does this mean? – The Impaler Jun 01 '18 at 18:09
  • Oh my bad. It is last measured value in TAB2 – Mehmet Ali Küçük Jun 01 '18 at 19:30
  • Can you specify more clearly what you mean by _I need compare these 3 items with which is belong to TAB2 with TAB1_ ? Which _3 items_ ? What do you mean by _belong to TAB2 with TAB1_ ? The contents or structure of table TAB1 is also not specified. – JanVdA Jun 04 '18 at 11:55
  • Think about you have Motor1 and Motor2 Database and you want to compare these database and detect which one has hig frequency. For this comparing system what sould i do in node-red to achieve this goal? – Mehmet Ali Küçük Jun 08 '18 at 08:59

0 Answers0