SQL a BigQuery.
-
21-12-2019 - |
Domanda
Come faccio a convertire seguendo SQL in 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;
.
Sto ricevendo il seguente errore "Incontrata" "Dove" "Dove" "At Linea 2, Colonna 1"
Soluzione
Il tuo WHERE
è nel posto sbagliato.WHERE
dovrebbe essere prima di GROUP BY
e dopo l'ultimo JOIN
o dopo FROM
se non ci sono JOINS
.
Prova questo:
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
. Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow