title: How Do I Column to Row?
body: <pre><code>CREATE TABLE `history_kw_main` (
  `logdate` DATE NULL,
  `logtime` TIME NULL,
  `0h` INT(11) NULL,
  `1h` INT(11) NULL,
  `2h` INT(11) NULL,
  `3h` INT(11) NULL,
  `4h` INT(11) NULL,
  `5h` INT(11) NULL,
  `6h` INT(11) NULL,
  `7h` INT(11) NULL,
  `8h` INT(11) NULL,
  `9h` INT(11) NULL,
  `10h` INT(11) NULL,
  `11h` INT(11) NULL,
  `12h` INT(11) NULL,
  `13h` INT(11) NULL,
  `14h` INT(11) NULL,
  `15h` INT(11) NULL,
  `16h` INT(11) NULL,
  `17h` INT(11) NULL,
  `18h` INT(11) NULL,
  `19h` INT(11) NULL,
  `20h` INT(11) NULL,
  `21h` INT(11) NULL,
  `22h` INT(11) NULL,
  `23h` INT(11) NULL,
  UNIQUE INDEX `uix_kW_main` (`logdate`, `logtime`) USING BTREE);
  </code></pre>
  <p>There is a column representing 24 hours.
  Data comes in every 15 minutes.
  For example, at 10:15, the value is entered in the logtime column of the 10h column.
  I want to add the values ​​of all columns based on logdate.
  In other words,
  I want to create a group with logdate and sum the values ​​for all time zones on that day.
  How is there a way?</p>