BigQuery-错误:员工的名称未被识别的名称,雇员,部门。
我和我的教练一起跟随,我似乎无法解决一个特定的问题。该主题是使用联接功能,尤其是内部联接来从数据集中的两个表中汇总数据。我在数据集中创建了一个数据集(Employee_data),我还创建了两个表(员工,部门)。这两个表具有dections_id列。练习是为了获取员工名单及其部门名称,不包括没有部门的任何员工使用内部联接功能。员工表作为以下列(名称,Department_ID,角色),而部门表作为以下列(name,dectiber_id)
SELECT
employees.name AS employees_name,
employees.role AS employees_role,
Department.name AS department_name
FROM `employee_data.employees`
INNER JOIN
`employee_data.Department` ON
employees.department_id = department.department_id
我一直在员工中遇到未识别的名称的错误。Name.name,employs.Role,部门。名称,员工。department_id
I was following along with my instructor, and I can't seem to get pass a particular issue. The topic is using the JOIN function particularly the INNER JOIN to aggregate data from two tables in a dataset. I created a dataset(employee_data), in the dataset I also created two tables(employees, Department). This two tables have department_id column. The exercise was to get the list of employees and their department name, excluding any employee without a department_id using the INNER JOIN function. The employees table as the following columns(name, department_id, role), while the Department table as the following columns(name, department_id)
SELECT
employees.name AS employees_name,
employees.role AS employees_role,
Department.name AS department_name
FROM `employee_data.employees`
INNER JOIN
`employee_data.Department` ON
employees.department_id = department.department_id
I keep getting an error of unrecognized name at employees.name, employees.role, Department.name, employees.department_id
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在BigQuery中,当您选择具有
table_name.column
的特定表中的列时,必须使用数据集名称指定您的表名称(例如)。相反,在表中给出一个别名名称,然后使用它选择一列。
In BigQuery, when you are selecting a column in a specific table with a
table_name.column
, your table name must be specified with a dataset name (e.g.dataset.table
.column).Instead, give an alias name to the table and select a column using it.