Web Sales Queries

 

Embed or link this publication

Popular Pages


p. 1

simple queries q1 1 column restrict on sorted column 2 values select count from web_sales where ws_sold_date_sk in 2451484,2451485 q2 1 column restrict on unsorted column 5 values select count from web_sales where ws_web_site_sk in 1,7,33,42,70 q3 1 column restrict on unsorted column 1 value select count from web_sales where ws_web_site_sk 42 q4 1 column restrict on unsorted column range of value select count from web_sales where ws_web_site_sk between 33 and 42 q5 2 column restrict on one sorted column and one on unsorted column select count from web_sales where ws_sold_date_sk in 2451484,2451485 and ws_web_site_sk=1;

[close]

p. 2

join queries q-j1 select i_product_name as item ws_list_price as msrp ws_sales_price as sale price count as items sold from web_site date_dim item web_sales sales where sales.ws_web_site_sk web_site.web_site_sk and sales.ws_item_sk item.i_item_sk and sales.ws_sold_date_sk date_dim.d_date_sk and web_site_sk in select distinct web_site_sk from web_site where web_city springfield and d_date between cast 1999-11-01 as date and cast 1999-11-14 as date group by 1,2,3 limit 20;

[close]

p. 3

q-j2 select ws_bill_customer_sk as customer c_first_name as first name c_last_name as last name cd_gender as gender cd_marital_status as marital status cd_credit_rating as credit rating sumws_list_price as total spent from date_dim web_sales sales customer customer_demographics where sales.ws_bill_customer_sk customer.c_customer_sk and customer.c_customer_sk customer_demographics.cd_demo_sk and sales.ws_sold_date_sk date_dim.d_date_sk and d_date between cast 1999-12-01 as date and cast 1999-12-14 as date and ws_web_site_sk in select distinct web_site_sk from web_site where web_city oakland group by 1,2,3,4,5,6 order by 7 desc limit 20;

[close]

p. 4

q-j3 select web_name as website name sm_code as shipment mode sumws_ship_mode_sk as total shipments from date_dim ship_mode web_site customer web_sales sales where sales.ws_ship_mode_sk ship_mode.sm_ship_mode_sk and sales.ws_web_site_sk web_site.web_site_sk and sales.ws_sold_date_sk date_dim.d_date_sk and sales.ws_bill_customer_sk customer.c_customer_sk and d_date between cast 1999-12-01 as date and cast 1999-12-14 as date and c_customer_sk in 165201 561057 941172,1809483,1159759 226322,1120482,1060288,1254087 493303,1768379 622967 439777 125354,1358195 832504 237511 59200 208637,1366709 group by 1,2 order by 3 desc;

[close]

p. 5

q-j4 select ws_bill_customer_sk as customer id c_email_address as customer email sumws_list_price as total sales from customer select cd_demo_sk from customer_demographics where cd_education_status in college advanced degree and cd_marital_status in s u int_demo web_sales sales where sales.ws_bill_customer_sk customer.c_customer_sk and customer.c_customer_sk int_demo.cd_demo_sk group by 1,2 order by 3 desc limit 100;

[close]

Comments

no comments yet

YOUBLISHER
About
What Others Say
Sitemap
Impressum

PUBLISHERS
Login
Signup
Tutorials
FAQ
Support

BUSINESS
Overview
Advertising
Support

DEVELOPERS
API

LEGAL
Report a Copyright Violation
Copyright FAQ
Terms of Use
Privacy Policy