What is the correct syntax for the following query in bigquery?
SELECT COUNT(children.names) WITHIN RECORD AS numberOfChildren FROM [dataset.tableId] where numberOfChildren > 10;
Try adding a subselect and applying the filter to the outer select:
SELECT numberOfChildren FROM (
SELECT COUNT(children.names) WITHIN RECORD AS numberOfChildren
FROM [dataset.tableId]
)
WHERE numberOfChildren > 10;
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more