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

error in query77a #30

Closed
gregrahn opened this issue Apr 27, 2017 · 4 comments
Closed

error in query77a #30

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

Comments

@gregrahn
Copy link
Owner

gregrahn commented Apr 27, 2017

As of v2.4 query77a is missing cr_call_center_sk in the select list and group by making it semantically different

query77a

 cr as
 (select
        sum(cr_return_amount) as returns,
        sum(cr_net_loss) as profit_loss
 from catalog_returns,
      date_dim
 where cr_returned_date_sk = d_date_sk
       and d_date between cast('[SALES_DATE]' as date)
                  and (cast('[SALES_DATE]' as date) +  30 )
 ),

query77

cr as
 (select cr_call_center_sk,
         sum(cr_return_amount) as returns,
         sum(cr_net_loss) as profit_loss
 from catalog_returns,
      date_dim
 where cr_returned_date_sk = d_date_sk
       and d_date between cast('[SALES_DATE]' as date)
                  and (cast('[SALES_DATE]' as date) +  30 days)
 group by cr_call_center_sk
 ), 
@gregrahn gregrahn added the bug label Apr 27, 2017
@gregrahn
Copy link
Owner Author

Fixed in this repo via 17d24b5.

@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

gregrahn commented Jul 22, 2018

Fixed in v2.9.0

$ diff v2.8.0rc4/query_variants/query77a.tpl v2.9.0rc2/query_variants/query77a.tpl
76,78c76,78
<  (select
<         sum(cr_return_amount) as returns,
<         sum(cr_net_loss) as profit_loss
---
>  (select cr_call_center_sk
>          sum(cr_return_amount) as returns,
>          sum(cr_net_loss) as profit_loss
84c84
<  ),
---
>  group by cr_call_center_sk),

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