Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

[Feature] Referencing by alias in the same SELECT statement

 

SELECT
  1 + 1 AS test,
  test * 0.85 AS test2

 

This is one of the biggest limitations of BigQuery at the moment, which makes data models unnecessary longer, more convoluted, and quicker to hit BigQuery limitations. When can we expect this to be introduced? Let's make some noise to bring this feature in!

 

Solved Solved
1 1 299
1 ACCEPTED SOLUTION

Hi @Dawid,

Welcome to Google Cloud Community!

Yes you’re correct, there’s no feature yet on BigQuery referencing an alias in the same SELECT statement.

Upon checking, there’s already an  filed for this functionality. With this, you may share your feedback by commenting on the bug so our engineers can take note of it. You can also up vote it as shown in the image below:

Screenshot 2024-12-13 12.31.21 AM.png

Note that there’s no definite date as to when this will be implemented. For future updates, I suggest keeping an eye out on the  and release notes of BigQuery.

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.

View solution in original post

1 REPLY 1

Hi @Dawid,

Welcome to Google Cloud Community!

Yes you’re correct, there’s no feature yet on BigQuery referencing an alias in the same SELECT statement.

Upon checking, there’s already an  filed for this functionality. With this, you may share your feedback by commenting on the bug so our engineers can take note of it. You can also up vote it as shown in the image below:

Screenshot 2024-12-13 12.31.21 AM.png

Note that there’s no definite date as to when this will be implemented. For future updates, I suggest keeping an eye out on the  and release notes of BigQuery.

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.