search

Home  >  Q&A  >  body text

mysql - Find SQL statement


How to use SQL statements to realize the sum of each column in Total One, Total Two, and Total Three?

黄舟黄舟2776 days ago774

reply all(2)I'll reply

  • 巴扎黑

    巴扎黑2017-05-18 10:52:09

    select sum(num) from table group by title;

    reply
    0
  • PHP中文网

    PHP中文网2017-05-18 10:52:09

    Are total one, total two and total three the column names of three columns? Do you want to calculate the sum of these three columns respectively?
    If that’s what you mean, then try
    select sum(合计一) from 表名;
    Calculate the sum of one column in this way, and the other two are the same

    reply
    0
  • Cancelreply