Both iterations (queries) in query24.tpl seem to be missing the PK/FK join condition between between customer and customer_address which correlates to customers who currently live in their birth countries and in the neighborhood of the store (snippet of business question from specification).
as of v2.3.0
from store_sales
,store_returns
,store
,item
,customer
,customer_address
where ss_ticket_number = sr_ticket_number
and ss_item_sk = sr_item_sk
and ss_customer_sk = c_customer_sk
and ss_item_sk = i_item_sk
and ss_store_sk = s_store_sk
and c_current_addr_sk = ca_address_sk -- this join is missing in query24.tpl
and c_birth_country = upper(ca_country)
and s_zip = ca_zip
and s_market_id=[MARKET]
Both iterations (queries) in
query24.tpl
seem to be missing the PK/FK join condition between betweencustomer
andcustomer_address
which correlates to customers who currently live in their birth countries and in the neighborhood of the store (snippet of business question from specification).as of v2.3.0