Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugs in query22a #31

Open
gregrahn opened this issue Apr 27, 2017 · 6 comments
Open

bugs in query22a #31

gregrahn opened this issue Apr 27, 2017 · 6 comments
Labels

Comments

@gregrahn
Copy link
Owner

gregrahn commented Apr 27, 2017

As of v2.4 the results CTE has a group by that appears to be a mistake. There is no aggregate and when removing the group by query22a returns the same result then as query22.

ERROR:  column "inventory.inv_quantity_on_hand" must appear in the GROUP BY clause or be used in an aggregate function
LINE 6:              ,inv_quantity_on_hand qoh
                      ^

Additionally query22a has a reference to the warehouse table and corresponding join -- which is not present in query22.

from inventory
           ,date_dim
           ,item
           ,warehouse  -- <<< Not in query22
       where  inv_date_sk=d_date_sk
              and inv_item_sk=i_item_sk
              and inv_warehouse_sk = w_warehouse_sk  -- <<< Not in query22
              and d_month_seq between [DMS] and [DMS] + 11
@gregrahn gregrahn added the bug label Apr 27, 2017
@gregrahn
Copy link
Owner Author

Fixed in this repo via 3a3d823.

@gregrahn
Copy link
Owner Author

Present in v2.4.0

@gregrahn
Copy link
Owner Author

Present in v2.6.0

@gregrahn
Copy link
Owner Author

Present in v2.9.0

@gregrahn
Copy link
Owner Author

Present in v2.11.0

@gregrahn gregrahn changed the title error in query22a bugs in query22a Mar 11, 2020
@gregrahn
Copy link
Owner Author

Removed references to warehouse in 5a3a817

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant