Questions tagged [legacy-sql]

Questions related to using "Legacy SQL" for Google BigQuery

78 questions
0
votes
1 answer

BigQuery Error – UNIQUE_HEAP requires an int32 argument

Using legacy SQL, I am trying to use COUNT(DISTINCT field, n) in Google BigQuery. But I am get following error: UNIQUE_HEAP requires an int32 argument which is greater than 0 (error code: invalidQuery) Here is my query that I have used: SELECT …
Shamshad Alam
  • 1,684
  • 3
  • 19
  • 31
-1
votes
1 answer

BigQuery - Find most recent entry for each value over the last 365 days

I have my Gmail logs being sent to BQ and I am trying to find the last time an email was sent to a list of addresses (and only pull the latest information) Here is the query I am using so far: SELECT FORMAT_UTC_USEC(event_info.timestamp_usec) AS…
SL8t7
  • 617
  • 2
  • 9
  • 27
-1
votes
1 answer

Query Database Accurately Based on Timestamp

I am currently having an accuracy issue when querying price vs. time in a Google Big Query Dataset. What I would like is the price of an asset every five minutes, yet there are some assets that have an empty row for an exact minute. For example,…
Enesxg
  • 127
  • 4
  • 13
1 2 3 4 5
6