| ==== |
| ---- QUERY: TPCDS-Q42 |
| select |
| dt.d_year, |
| item.i_category_id, |
| item.i_category, |
| sum(ss_ext_sales_price) |
| from |
| date_dim dt, |
| store_sales, |
| item |
| where |
| dt.d_date_sk = store_sales.ss_sold_date_sk |
| and store_sales.ss_item_sk = item.i_item_sk |
| and item.i_manager_id = 1 |
| and dt.d_moy = 11 |
| and dt.d_year = 2000 |
| group by |
| dt.d_year, |
| item.i_category_id, |
| item.i_category |
| order by |
| sum(ss_ext_sales_price) desc, |
| dt.d_year, |
| item.i_category_id, |
| item.i_category |
| limit 100; |
| ---- RESULTS |
| 2000,7,'Home',458017.85 |
| 2000,3,'Children',370261.29 |
| 2000,2,'Men',368718.95 |
| 2000,1,'Women',320132.43 |
| 2000,10,'Electronics',281421.74 |
| 2000,5,'Music',223420.70 |
| 2000,4,'Shoes',221242.25 |
| 2000,8,'Sports',200806.45 |
| 2000,6,'Jewelry',167920.91 |
| 2000,9,'Books',161721.11 |
| ---- TYPES |
| INT, INT, STRING, DECIMAL |
| ==== |