BigQuery Join On - 错误:意外

时间:2013-01-15 09:42:12

标签: sql join google-bigquery

我反复得到

Error: Unexpected. Please try again.

使用此查询:

SELECT Pollen.start, DNase.start, DNase.DNasecleavage
FROM   DNAse_raw_seq.DNAse_raw_seq_Chr1_table AS DNase
JOIN   DNAse_raw_seq.polleninput AS Pollen
       ON DNase.start  = Pollen.start
       where Pollen.GeneID contains "At1";

昨天我在类似的table2上使用了相同的查询,工作正常。 谢谢你的任何建议!

2 个答案:

答案 0 :(得分:2)

知道了!

正常运行的查询如下所示

SELECT Pollen.GeneID, Pollen.start, DNase.DNasecleavage
FROM   DNAse_raw_seq.DNAse_raw_seq_Chr1_table AS DNase
JOIN   DNAse_raw_seq.polleninput AS Pollen
       ON DNase.start = Pollen.start
       where Pollen.GeneID contains "At1";

我不被允许选择DNase.start ....

答案 1 :(得分:0)

SELECT Pollen.start, DNase.start, DNase.DNasecleavage
FROM   DNAse_raw_seq.DNAse_raw_seq_Chr1_table AS DNase
JOIN   DNAse_raw_seq.polleninput AS Pollen
       ON DNase.start  = Pollen.start
       where Pollen.GeneID contains "At1";

你想在“Pollen.GeneID”上使用哪里,但你没有选择它。 您可以通过将其添加到选择来修复它。像这样:

SELECT Pollen.GeneID, Pollen.start, DNase.start, DNase.DNasecleavage
FROM   DNAse_raw_seq.DNAse_raw_seq_Chr1_table AS DNase
JOIN   DNAse_raw_seq.polleninput AS Pollen
       ON DNase.start  = Pollen.start
       where Pollen.GeneID contains "At1";