Addition of two mysql query results

mysql
#21

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

0 Likes

#22

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

0 Likes

#23

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?

0 Likes

#24

no, i didn’t understand your comment there.

0 Likes

#25

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

in SUM(tcount), tcount is a column name

1 Like

closed #26

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

0 Likes