Skip to main content

BI Project Scenario

 

Scenario Review the following scenario. Then complete the step-by-step instructions. You are a BI analyst for a grocery store chain that monitors dietary trends affecting in-store purchases. Your company wants you to examine which types of Hass avocados are purchased most often. The avocados are categorized as one of four sizes: small, medium, large, and extra large. In addition to the average price and total volume of each avocado, the date of each sale is also recorded. Using this data, you will create a historical table that illustrates how indexes and partitions work. This will allow you to practice creating partitions and clustered tables and demonstrate how to use them. Your goal is to use partitions and clusters to answer the following question: What is the distribution of avocado sales from 2015 to 2021?



To begin, create a new table without a partition or cluster. This will serve as a baseline to compare to the partitioned and clustered tables. Name it avocados.


Then, in the Editor tab, copy and paste the following SQL code and click Run. 







this is the result:







Next, create a table partitioned by an integer range (the years 2015 through 2022). Name it avocados_partitioned.

Return to the tab you entered the SQL code into. Delete that code then copy and paste the following SQL code. Click Run.










this is the result:












Next, create a table partitioned by an integer range and clustered by type. Name it avocados_clustered.

Return to the tab where you entered the SQL code. Delete that code, then copy and paste the following SQL code. Click Run.



















Query the tables and compare performance

Query the Table without a partition or cluster


Query the partitioned Table




Query the partitioned and clustered Table





















Comments

Popular posts from this blog

Unlocking South America's Data Potential: Trends, Challenges, and Strategic Opportunities for 2025

  Introduction South America is entering a pivotal phase in its digital and economic transformation. With countries like Brazil, Mexico, and Argentina investing heavily in data infrastructure, analytics, and digital governance, the region presents both challenges and opportunities for professionals working in Business Intelligence (BI), Data Analysis, and IT Project Management. This post explores the key data trends shaping South America in 2025, backed by insights from the World Bank, OECD, and Statista. It’s designed for analysts, project managers, and decision-makers who want to understand the region’s evolving landscape and how to position themselves for impact. 1. Economic Outlook: A Region in Transition According to the World Bank’s Global Economic Prospects 2025 , Latin America is expected to experience slower growth compared to global averages, with GDP expansion constrained by trade tensions and policy uncertainty. Brazil and Mexico remain the largest economies, with proj...

“Alive and Dead?”

 Schrödinger’s Cat, Quantum Superposition, and the Measurement Problem 1. A Thought-Experiment with Nine Lives In 1935, Austrian physicist Erwin Schrödinger devised a theatrical setup to spotlight how bizarre quantum rules look when scaled up to everyday objects[ 1 ]. A sealed steel box contains: a single radioactive atom with a 50 % chance to decay in one hour, a Geiger counter wired to a hammer, a vial of lethal cyanide, an unsuspecting cat. If the atom decays, the counter trips, the hammer smashes the vial, and the cat dies; if not, the cat survives. Quantum mechanics says the atom is in a superposition of “decayed” and “not-decayed,” so—by entanglement—the whole apparatus, cat included, must be in a superposition of ‘alive’ and ‘dead’ until an observer opens the box[ 1 ][ 2 ]. Schrödinger wasn’t condemning tabbies; he was mocking the idea that microscopic indeterminacy automatically balloons into macroscopic absurdity. 2. Superposition 101 The principle: if a quantum syste...

5 Essential Power BI Dashboards Every Data Analyst Should Know

In today’s data-driven world, Power BI has become one of the most powerful tools for data analysts and business intelligence professionals. Here are five essential Power BI dashboards every data analyst should know how to build and interpret. ## 1. Sales Dashboard Track sales performance in real-time, including: - Revenue by region - Monthly trends - Year-over-year comparison 💡 Use case: Sales teams, area managers --- ## 2. Marketing Dashboard Monitor marketing campaign effectiveness with: - Cost per click (CPC) - Conversion rate - Traffic sources 💡 Use case: Digital marketing teams --- ## 3. Human Resources (HR) Dashboard Get insights into: - Absenteeism rate - Average employee age - Department-level performance 💡 Use case: HR departments, business partners --- ## 4. Financial Dashboard Keep financial KPIs under control: - Gross operating margin (EBITDA) - Monthly cash inflow/outflow - Profitability ratios 💡 Use case: Finance and accounting teams --- ## 5. Customer Dashboard Segme...