MySQL:组合多个计算字段

时间:2016-11-28 04:46:15

标签: mysql concatenation calculated-columns

组合多个计算字段时遇到问题......

表格(简体)

$('.infor-experience').on('click', '.submit', function(e) {
        alert("TEST");
})

目标是构建一个包含4个平均值计算列的报告(为清晰起见显示的标签,目前与查询标题不匹配:

tblHVSR
+--------+-------------+--------------+-------------------+-----------------------------+
| hvsrID | hvsrChildID | hvsrParentID | hvsrDateOfContact | hvsrDaysParentReadWithChild |
+--------+-------------+--------------+-------------------+-----------------------------+
| autoIn | smallint    | smallint     | date              | smallint                    |
+--------+-------------+--------------+-------------------+-----------------------------+

经过大量的网络搜索后,我尝试了以下内容:

+-------+--------+-----------+-----------+-----------+----------+
| Child | Parent | 1MonthAvg | 3MonthAvg | 6MonthAvg | 1YearAvg |
+-------+--------+-----------+-----------+-----------+----------+
显然,我迷失在这里,而且情况只会越来越糟。有人可以帮我解决这个问题吗?

0 个答案:

没有答案