• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: Unable to use ALIASES in subquery inside SQL Select clause

Resolved: Unable to use ALIASES in subquery inside SQL Select clause

0
By Isaac Tonny on 17/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

I’m trying to use an alias inside a subquery in a select statement like the one below:
When I try to execute the query I get this error:

‘Invalid column name ‘InvoiceAverage’.


Answer:

No need for a subquery here, use windowed aggregates:

If you have better answer, please add a comment about this, thank you!

sql sql-server-2019
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: How to set consistent decimal separators in R data frame?

26/03/2023

Resolved: How to resolve LNK2001 in c++ projects

26/03/2023

Resolved: How to correctly initialize vector of number in Typescript

26/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.