how many ks can you find in:
:
width=600 alt=image 2 data-src=/kb/database/market-basket-analysis/0_northwind_erd.gif class=lazyload data-sizes=auto data->:
width=600 alt=image 3 data-src=/kb/database/market-basket-analysis/bad_results.gif class=lazyload data-sizes=auto data->.
what we want is to see is product a and product b purchased together (have by the same order id). this can be accomplished by doing the following:
so, let us begin by creating a project in bids (sql server business intelligence development studio).
width=600 alt=image 5 data-src=/kb/database/market-basket-analysis/1_create_project.gif class=lazyload data-sizes=auto data->
next, create a connection to the nothwind database:
width=600 alt=image 6 data-src=/kb/database/market-basket-analysis/2_create_connection_to_db.gif class=lazyload data-sizes=auto data->
next, create the data source view:
width=562 alt=image 7 data-src=/kb/database/market-basket-analysis/3_create_data_source_view.gif class=lazyload data-sizes=auto data->
next, create the product dimension by using the products and categories tables. the key for the dimension will be productid.
width=500 alt=image 8 data-src=/kb/database/market-basket-analysis/4_create_product_dim.gif class=lazyload data-sizes=auto data->
width=500 alt=image 9 data-src=/kb/database/market-basket-analysis/5_create_product_dim.gif class=lazyload data-sizes=auto data->
width=500 alt=image 10 data-src=/kb/database/market-basket-analysis/6_create_dim-related_table.gif class=lazyload data-sizes=auto data->
width=600 alt=image 11 data-src=/kb/database/market-basket-analysis/7_create_product_dim.gif class=lazyload data-sizes=auto data->
next, create the orders dimension by using the orders table. the key for the dimension will be orderid.
width=600 alt=image 12 data-src=/kb/database/market-basket-analysis/7_create_orders_dim.gif class=lazyload data-sizes=auto data->
now, create the sales cube. uncheck the auto-build.
width=500 alt=image 13 data-src=/kb/database/market-basket-analysis/8_create_cube.gif class=lazyload data-sizes=auto data->
width=500 alt=image 14 data-src=/kb/database/market-basket-analysis/9_create_cube.gif class=lazyload data-sizes=auto data->
width=500 alt=image 15 data-src=/kb/database/market-basket-analysis/10_create_cube.gif class=lazyload data-sizes=auto data->
width=500 alt=image 16 data-src=/kb/database/market-basket-analysis/11_create_cube.gif class=lazyload data-sizes=auto]
width=600 alt=image 17 data-src=/kb/database/market-basket-analysis/13_add_named_query.gif class=lazyload data-sizes=auto data->
the data source view should look like:
width=526 alt=image 18 data-src=/kb/database/market-basket-analysis/14_updated_erd.gif class=lazyload data-sizes=auto data->
under the cube structur, tab, right click on the cube and choose to add a new measure group.
under the dimension usage tab, right click to add a new cube dimension. choose products. rename the cube dimension to “products 2”.
width=541 alt=image 20 data-src=/kb/database/market-basket-analysis/14_add_second_cube_dim-product_2.gif class=lazyload data-sizes=auto data->
link the second product dimension to the first sales measure group using a many-to-many relationship type.
width=600 alt=image 21 data-src=/kb/database/market-basket-analysis/15_modify_dimension_usage.gif class=lazyload data-sizes=auto data->]
ahmadian777 wrote:please send sample data mining for me (sql server 2005)
general news suggestion question bug answer joke praise rant admin
use ctrl+left/right to switch messages, ctrl+up/down to switch threads, ctrl+shift+left/right to switch pages.
user
I counted sixty-three "k"s in that text.
assistant