Addition of two mysql query results

an auto_increment is not going to work for this

you should have a skinny and tall table – one temperature per time, many rows

e.g.

CREATE 
  TABLE astb 
      ( temptime DATETIME NOT NULL
      , temp INT NOT NULL
      , PRIMARY KEY ( temptime, temp)
      )

your queries will be simpler then too

thank you. so you mean I should use the same query structure too?

yes, but instead of the query calculating16 differences, there’s only one

it’s up to you though

did you understand my comment about summing a string?

no, i didn’t understand your comment there.

in SUM('tcount'), 'tcount' is a character string

in SUM(tcount), tcount is a column name

1 Like

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