FoodMart MySQL是一款基于MySQL數(shù)據(jù)庫的仿真商店數(shù)據(jù)倉庫。它包含有關(guān)食品銷售的真實數(shù)據(jù),是用于商業(yè)分析和數(shù)據(jù)挖掘的理想資源。
FoodMart MySQL包含多個表,包括有關(guān)產(chǎn)品、銷售、客戶、員工和地理位置等方面的數(shù)據(jù)。以下是一個樣例查詢,它將檢索從1997年至2001年期間每年不同部門的銷售總額:
SELECT the_year, department_description, ROUND(SUM(sales_fact_1997.aggregate_sales * sales_fact_1997.unit_sales), 0) AS total_sales FROM time_by_day time_by_day, sales_fact_1997 sales_fact_1997, store store, product product, customer customer, promotion promotion, department department WHERE sales_fact_1997.time_id = time_by_day.time_id AND time_by_day.the_year IN (1997, 1998, 1999, 2000, 2001) AND sales_fact_1997.store_id = store.store_id AND store.store_country = 'USA' AND sales_fact_1997.product_id = product.product_id AND product.product_department = department.department_id AND sales_fact_1997.customer_id = customer.customer_id AND customer.country = 'USA' AND sales_fact_1997.promotion_id = promotion.promotion_id GROUP BY the_year, department_description ORDER BY the_year, total_sales DESC;
通過FoodMart MySQL,用戶可以進行各種分析,如對銷售趨勢的分析、對不同地理位置的銷售數(shù)據(jù)的比較、對不同產(chǎn)品種類的銷售數(shù)據(jù)的比較,以及對客戶行為的分析等等。因此,它是商業(yè)分析師、數(shù)據(jù)分析師、商業(yè)決策者等群體的理想工具。