我的数据库
employee(employee-name, street, city)
works(employee-name, company-name, salary)
company(company-name, city)
manages(employee-name, manager-name)
我坚持#3,到目前为止我已经
了select company-name
from company
inner join works.employee-name, works.company-name
where company-name = '75'
我知道这是错的?但我接近了吗? 我甚至没有看过@ 4和5
答案 0 :(得分:1)
SELECT "company - name", count(*)
FROM works
GROUP BY "company - name"
HAVING count(*) = 75
答案 1 :(得分:0)
答案:
1.从employees中选择manager-name,其中employee-name =' John Doe'
2.从manage-name =' John Doe'
的管理中选择员工姓名
3.从有计数(员工姓名)= 75组的作品中选择公司名称
按公司名称
4.从公司名称=' First Bak Corp'
按城市分组
5.从员工e加入工作中选择计数(e.employee-name)
e.emp-name = w.emp-name其中w.company-name =' CityBank'和
e.city =&#39;纽约&#39;按e.emp-name组分组<