【问题标题】:Calculate the number of active vendor in the last 3 months in Bigquery在 Bigquery 中计算过去 3 个月内活跃的供应商数量
【发布时间】:2021-08-16 03:42:40
【问题描述】:

我是 SQL 新手,我想计算最近 3 个月内活跃的供应商数量(如果一个供应商在一个供应商内至少有一笔交易,则该供应商被认为是活跃的) 一定的时间范围) 从访问https://console.cloud.google.com/marketplace/product/iowa-department-of-commerce/iowa-liquor-sales?filter=category:analytics&filter=price:free&filter=solution-type:dataset&project=fiery-plate-322918&folder=&organizationId= 数据集获取的数据。 提前谢谢你

【问题讨论】:

    标签: sql google-bigquery calculated-columns countif


    【解决方案1】:

    该表格于 2019 年 6 月 4 日更新。因此没有最近几个月的当前数据。

    vendor_number
    FROM `bigquery-public-data.iowa_liquor_sales.sales` 
    where date>date_sub (current_date(),interval 3 month)
    GROUP BY 1
    

    不返回任何数据。

    【讨论】:

      猜你喜欢
      • 2020-09-13
      • 2021-03-06
      • 2019-03-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-08-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多