作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我得到:
(L1:268): JOIN (including semi-join) and UNION ALL (comma, date range) may not be combined in a single SELECT statement. Either move the UNION ALL to an inner query or the JOIN to an outer query.
SELECT a AS a,
Count( DISTINCT b, 999999) AS b,
FROM [dataset.partition_20121216],
[dataset.partition_20130115],
[dataset.partition_20130214]
WHERE created BETWEEN Timestamp('2013-01-05 00:00:00') AND Timestamp ('2013-02-15 23:59:59.999999')
AND id IN (
SELECT id
FROM [dataset.partition_20121216],
[dataset.partition_20130115],
[dataset.partition_20130214]
WHERE created BETWEEN Timestamp('2013-01-05 00:00:00') AND Timestamp ('2013-02-15 23:59:59.999999')
AND name = 'G’
)
GROUP each a
ORDER BY a
最佳答案
这是 BigQuery SQL 语法的限制,我将其更改为
SELECT a AS a,
Count( DISTINCT b, 999999) AS b,
FROM
(SELECT * FROM
[dataset.partition_20121216],
[dataset.partition_20130115],
[dataset.partition_20130214])
WHERE created BETWEEN Timestamp('2013-01-05 00:00:00') AND Timestamp ('2013-02-15 23:59:59.999999')
AND id IN (
SELECT id
FROM [dataset.partition_20121216],
[dataset.partition_20130115],
[dataset.partition_20130214]
WHERE created BETWEEN Timestamp('2013-01-05 00:00:00') AND Timestamp ('2013-02-15 23:59:59.999999')
AND name = 'G’
)
GROUP each a
ORDER BY a
关于google-bigquery - 大查询 "Where inner select"- 无法加入或联合,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29947929/
我是一名优秀的程序员,十分优秀!