苦苦于自定义SQL查询

时间:2019-03-12 16:06:01

标签: mysql sql erd

我必须查询以下内容:

显示一个视图,该视图显示计算每个员工区域所有员工奉献的结果,并按字母顺序按区域名称列出。

$this->db->query('create temporary table temp as (select dedication.employee_employeeID, dedication ID, COUNT(area) AS TotalFrequency from dedication, employees where dedication.employee_employeeID = dedication group by dedication.employee_employeeID)');

但是,我的网站上似乎没有工作吗?

这是我的关系:

enter image description here

0 个答案:

没有答案