CREATE VIEW EMPJOBS AS
SELECT EMPLOYEE.employee_id AS ENUM,
CONCAT(EMPLOYEE.first_name,
' ' , EMPLOYEE.last_name) AS NAME,
EMPLOYEE.email AS EMAIL,
COUNT(JOBHISTORY.end_date) AS FINISHEDJOBS
FROM EMPLOYEE, JOBHISTORY
WHERE JOBHISTORY.employee_id = EMPLOYEE.employee_id;
这就是我的陈述。我知道这是错的,因为它显示了这个:
它将end_date统计为一个大数。我怎么能计算每一个单独的ENUM?
谢谢!
答案 0 :(得分:1)
在最后添加 // Location of webpack output
output: {
path: path.join(__dirname, 'dll'),
filename: '[name].bundle.js',
library: '[name]'
},
plugins: [
new webpack.DllPlugin({
path: require(path.join(__dirname, 'dll/[name]-manifest.json')),
name: '[name]',
})
]
子句。
group by
作为最佳做法,请尝试使用正确的连接语法来连接表而不是使用逗号。还为表名添加别名以避免混淆和可读性。
答案 1 :(得分:0)
您也可以这样做:
CREATE VIEW EMPJOBS AS
SELECT EMPLOYEE.employee_id AS ENUM,
CONCAT(EMPLOYEE.first_name, ' ' , EMPLOYEE.last_name) AS NAME,
EMPLOYEE.email AS EMAIL,
Select(COUNT(end_date) From JOBHISTORY jh where jh.employee_id = E.employee_id) AS FINISHEDJOBS
FROM EMPLOYEE E;