I\'m using bigquery with a dataset called \'87891428\' containing daily tables. I try to query a dates range thanks to the function TABLE_DATE_RANGE:
SELECT avg(
The fix for this is to use brackets around the dataset name and table prefix:
SELECT avg(foo) FROM ( TABLE_DATE_RANGE([87891428.a_abc_], TIMESTAMP('2014-09-30'), TIMESTAMP('2014-10-19')) )