문제

다음 SQL을 BigQuery로 변환하려면 어떻게 해야 하나요?

SELECT table1.field1, table2.field2, table2.field3, table2.field4, table2.field5, table2.field6, table2.field7 
FROM table1
JOIN EACH table2 on table1.cookie=table2.cookie 
GROUP BY table2.field3,table1.field1,table2.field2,table2.field4,table2.field5,table2.field6,table2.field7
WHERE table2.field3=1176;

다음과 같은 오류가 발생합니다. " 2행 1열에서 " "WHERE" "WHERE ""가 발생했습니다. "

도움이 되었습니까?

해결책

당신의 WHERE 잘못된 위치에 있습니다. WHERE 전에 있어야 GROUP BY 그리고 마지막 이후 JOIN 아니면 그 이후 FROM 만약 없다면 JOINS.

이 시도:

SELECT table1.field1, table2.field2, table2.field3, table2.field4, table2.field5, table2.field6, table2.field7 
FROM table1 
JOIN EACH table2 on table1.cookie=table2.cookie 
WHERE table2.field3=1176;
GROUP BY table2.field3,table1.field1,table2.field2,table2.field4,table2.field5,table2.field6,table2.field7 
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top