简体   繁体   中英

CURRENT in BigQuery?

I've noticed that CURRENT is a reserved keyword for BigQuery at: https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical .

What exactly does CURRENT do? I've only seen it as a prefix for things such as CURRENT_TIME() , CURRENT_DATE() , and other such stuff but have never seen it by itself. Is this just reserved for future usage or do any SQL statements contain that as a keyword?

Just to add on the comment of @Jaytiger:

CURRENT keyword seems to be reserved as a part of SQL 2016 spec. en.wikipedia.org/wiki/SQL_reserved_words And you can check it's usage in another DBMS implementations like Oracle, SQL Server. hope this is helpful. stackoverflow.com/questions/49110728/where-current-of-in-pl-sql

In BigQuery CURRENT clause is used on defining frame_start and frame_end in window functions .

A window function, also known as an analytic function, computes values over a group of rows and returns a single result for each row.

A common usage for this is calculating a cumulative sum for each category in the table. See BigQuery window function examples for reference.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM