为什么我的查询不返回任何内容(SQL中的营销数据)

为什么我的查询不返回任何内容(SQL中的营销数据),sql,google-bigquery,Sql,Google Bigquery,我正在尝试运行一个Google BQ查询,它返回多少人在健康营销活动中转化和未转化,但它什么也不返回 ble that has a list of patient ids with a column of their times and whether they converted or not. I thought I cracked where I'm I going wrong? 下面是一些示例数据 [![enter image description here][1][1]我首先要看一

我正在尝试运行一个Google BQ查询,它返回多少人在健康营销活动中转化和未转化,但它什么也不返回

ble that has a list of patient ids with a column of their times and whether they converted or not. I thought I cracked where I'm I going wrong?
下面是一些示例数据
[![enter image description here][1][1]

我首先要看一下WHERE语句,它需要在日期和字符串等周围加引号

activity_id IN ("first_campaign")

您还需要查看数据质量,例如,“first_campain”缺少“g”。

一个明显的问题是:

 TIMESTAMP_MICROS(event_time) BETWEEN timestamp_micros(2017-01-01) AND timestamp_micros(2017-12-26)
我推测你想要:

TIMESTAMP_MICROS(event_time) BETWEEN TIMESTAMP('2017-01-01') AND TIMESTAMP('2017-12-26')

表达式
2017-01-01
的计算结果为
2015
,一般来说,这不是一个非常有趣的微秒数。

请看一看。我得到以下错误:参数类型的函数时间戳没有匹配的签名:INT64。支持的签名:时间戳(字符串,[STRING]);时间戳(日期,[STRING])[6:21]@stacker。我的代码中没有任何内容会生成该错误,因为所有函数都只有一个参数。