-- groupby Having more than sorted once
select avg(${database}.${schema}.store_sales_customer_item.ss_item_sk),${database}.${schema}.store_sales_customer_item.ss_sold_date_sk from ${database}.${schema}.store_sales_customer_item
group by ${database}.${schema}.store_sales_customer_item.ss_customer_sk, ${database}.${schema}.store_sales_customer_item.ss_item_sk, ${database}.${schema}.store_sales_customer_item.ss_sold_date_sk