| ==== |
| ---- QUERY: TPCDS-Q15 |
| select ca_zip |
| ,sum(cs_sales_price) |
| from catalog_sales |
| ,customer |
| ,customer_address |
| ,date_dim |
| where cs_bill_customer_sk = c_customer_sk |
| and c_current_addr_sk = ca_address_sk |
| and ( substr(ca_zip,1,5) in ('85669', '86197','88274','83405','86475', |
| '85392', '85460', '80348', '81792') |
| or ca_state in ('CA','WA','GA') |
| or cs_sales_price > 500) |
| and cs_sold_date_sk = d_date_sk |
| and d_qoy = 2 and d_year = 2001 |
| group by ca_zip |
| order by ca_zip |
| limit 100; |
| ---- RESULTS |
| '30059',688.80 |
| '30069',323.60 |
| '30150',372.79 |
| '30162',1609.70 |
| '30169',1326.30 |
| '30191',513.21 |
| '30194',244.76 |
| '30309',94.27 |
| '30330',447.07 |
| '30399',196.46 |
| '30411',713.29 |
| '30492',115.82 |
| '30499',1142.24 |
| '30525',406.09 |
| '30534',1341.26 |
| '30587',297.85 |
| '31087',573.97 |
| '31289',669.35 |
| '31387',1226.80 |
| '31675',362.70 |
| '31692',541.53 |
| '31749',182.57 |
| '31757',1553.34 |
| '31838',862.54 |
| '31933',675.18 |
| '31952',1063.42 |
| '32219',707.81 |
| '32293',828.11 |
| '32477',329.28 |
| '32565',368.44 |
| '32724',519.06 |
| '32812',1129.14 |
| '32898',1283.01 |
| '33003',838.16 |
| '33075',190.62 |
| '33394',138.83 |
| '33451',1441.78 |
| '33511',431.19 |
| '33604',1224.86 |
| '33683',616.38 |
| '33951',1241.72 |
| '34027',407.13 |
| '34062',443.22 |
| '34092',366.23 |
| '34098',276.14 |
| '34107',1320.29 |
| '34136',465.89 |
| '34190',426.36 |
| '34244',1508.42 |
| '34289',360.52 |
| '34338',1290.05 |
| '34466',1926.39 |
| '34536',462.20 |
| '34593',1237.42 |
| '34854',473.89 |
| '34975',293.97 |
| '35038',532.46 |
| '35115',465.95 |
| '35124',1186.38 |
| '35281',820.44 |
| '35413',328.47 |
| '35508',309.54 |
| '35709',526.74 |
| '35752',278.29 |
| '35804',1067.01 |
| '35817',2487.41 |
| '35867',581.94 |
| '36060',173.58 |
| '36074',230.91 |
| '36098',907.80 |
| '36115',298.06 |
| '36192',1034.53 |
| '36534',1649.99 |
| '36557',1722.27 |
| '36614',1557.87 |
| '36668',730.76 |
| '36719',1039.55 |
| '36787',463.11 |
| '36867',473.78 |
| '36871',777.15 |
| '36971',505.82 |
| '37057',2784.75 |
| '37683',526.34 |
| '37746',1903.08 |
| '37838',984.60 |
| '38014',337.71 |
| '38048',670.99 |
| '38054',1377.23 |
| '38075',827.32 |
| '38119',237.47 |
| '38167',620.19 |
| '38222',2633.06 |
| '38354',2411.29 |
| '38370',1494.42 |
| '38371',716.56 |
| '38579',601.67 |
| '38605',189.50 |
| '38721',2085.27 |
| '38828',261.89 |
| '38877',251.15 |
| ---- TYPES |
| STRING, DECIMAL |
| ==== |