Google cloud platform BigQuery中的操作之间没有结果
我试图找到一种在Bigquery中执行以下命令的较短方法Google cloud platform BigQuery中的操作之间没有结果,google-cloud-platform,google-bigquery,Google Cloud Platform,Google Bigquery,我试图找到一种在Bigquery中执行以下命令的较短方法 select * from `taxirides.historical_taxi_rides_raw` where pickup_latitude <=90 and pickup_latitude >= -90 and dropoff_latitude <=90 and dropoff_latitude >=-90 and pickup_longitude <=180 and pickup_longit
select * from `taxirides.historical_taxi_rides_raw`
where pickup_latitude <=90 and pickup_latitude >= -90
and dropoff_latitude <=90 and dropoff_latitude >=-90
and pickup_longitude <=180 and pickup_longitude >= -80
and dropoff_longitude <=180 and dropoff_longitude >= -80
limit 100
数据取自Bigquery样本数据集
因为我不确定字段的数据类型,但您应该做两个修改:- 对于BETWEEN函数,应该先给出较小的值,然后给出较大的值。您为两个字段(拾取纬度和衰减纬度)提供了相反的值:我已在下面的“给定查询”中进行了更正。 如果输入字段是字符串,请尝试使用cast更改字段的数据类型。 您修改的查询是:- 有“出租汽车。历史上的出租汽车” 选择“-73.9”作为拾取经度,“40.7”作为衰减经度,“73.9”作为拾取经度,“40.7”作为衰减经度 从“出租汽车。历史出租汽车”中选择* 其中,纬度为-90和90之间的64 纬度在-90和90之间 经度为-180和80之间的浮动64 并且在-180和80之间将衰减经度设置为float64
使用以下注释更改前两个中间值的顺序
select * from `taxirides.historical_taxi_rides_raw`
where pickup_latitude BETWEEN 90 and -90
and dropoff_latitude BETWEEN 90 and -90
and pickup_longitude BETWEEN -180 and 80
and dropoff_longitude BETWEEN -180 and 80
select * from `taxirides.historical_taxi_rides_raw`
where pickup_latitude BETWEEN -90 and 90
and dropoff_latitude BETWEEN -90 and 90
and pickup_longitude BETWEEN -180 and 80
and dropoff_longitude BETWEEN -180 and 80