google bigquery - Why am I getting the error "Bad number of arguments. Expected 2 or 3 arguments."? -


i'm running query window functions, , it's giving me error "bad number of arguments. expected 2 or 3 arguments."

how can fix this?

select    word,    word_count,    lag(word) on (partition corpus order word_count desc) lag,    [publicdata:samples.shakespeare]    corpus='othello' , length(word) > 10 limit 5 

instead of lag(word), use lag(word, 1) request previous row. same lead().

select    word,    word_count,    lag(word, 1) on (partition corpus order word_count desc) lag,    [publicdata:samples.shakespeare]    corpus='othello' , length(word) > 10 limit 5 

(the bigquery team working in meantime on patch support unary form of these functions)


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -