How to use the Qualify Function in BigQuery SQL
New Update on Google Cloud makes it general available

A maybe useful function for you is now generally available in Google BigQuery. The QUALIFY
clause, which lets you filter the results of analytic functions in Google Standard SQL.
Functionality