Below is a comprehensive set of interview questions for a Specialist –
Business Intelligence (BI) Development & Operations role. I’ve
grouped them by topic and included what interviewers are really looking
for, so you can prepare strong answers.
1. General & Conceptual BI Questions
1. What is Business Intelligence, and how does it support decision-
making?
2. Explain the difference between operational reporting and
analytical reporting.
3. What is the role of BI in organizational performance management?
4. How do you translate business requirements into BI solutions?
5. What KPIs have you designed, and how did they impact the business?
👉 Looking for: business understanding, clarity of thought, value-driven
mindset.
2. BI Development & Dashboard Design
6. Walk us through your process of developing a BI dashboard from
requirement gathering to deployment.
7. How do you design dashboards for different stakeholders (executives
vs. operational users)?
8. What principles do you follow to ensure effective data visualization?
9. How do you handle changes in requirements after dashboard
deployment?
10. Describe a challenging BI project and how you solved it.
👉 Looking for: structured approach, usability focus, adaptability.
3. Power BI / BI Tools (Technical)
11. What is the difference between Power BI Desktop and Power
BI Service?
12. Explain DAX and give examples of measures you have created.
13. How do you optimize Power BI report performance?
14. What is Row-Level Security (RLS) and when would you use it?
15. How do you manage dataset refresh and gateways?
👉 Looking for: hands-on experience, optimization and security knowledge.
4. Data Modeling & Warehousing
16. What is a star schema, and why is it preferred in BI?
17. Difference between fact tables and dimension tables?
18. How do you handle slowly changing dimensions (SCD)?
19. How do you ensure data consistency across multiple reports?
20. Describe your experience designing or supporting a data
warehouse.
👉 Looking for: solid data fundamentals, scalability awareness.
5. SQL & Data Analysis
21. Write a SQL query to get top 5 products by sales.
22. How do you optimize slow SQL queries?
23. Explain indexes and when not to use them.
24. Difference between INNER JOIN and LEFT JOIN?
25. How do you validate data accuracy in reports?
👉 Looking for: query efficiency, data correctness mindset.
6. BI Operations & Support
26. What does BI operations mean to you?
27. How do you monitor BI system performance?
28. Describe how you handle a failed dataset refresh.
29. How do you manage user access and permissions?
30. How do you ensure BI reports are always available and reliable?
👉 Looking for: reliability, incident handling, operational maturity.
7. Data Quality, Governance & Security
31. How do you ensure data quality in BI systems?
32. What data governance practices have you worked with?
33. How do you handle sensitive or confidential data in reports?
34. Explain the importance of metadata and documentation.
35. How do you manage version control for BI assets?
👉 Looking for: trust, compliance, best practices.
8. Automation & Optimization
36. Have you automated any BI processes? Explain how.
37. How do you reduce manual reporting work?
38. What tools or scripts have you used for automation?
39. How do you schedule alerts and subscriptions?
40. How do you measure BI solution effectiveness?
👉 Looking for: efficiency mindset, innovation.
9. Scenario-Based / Problem-Solving Questions
41. A manager says your dashboard numbers are incorrect. What do
you do?
42. A report is very slow during peak hours. How do you fix it?
43. Business users want real-time data, but systems are slow. What’s
your approach?
44. Multiple departments define KPIs differently—how do you handle
this?
45. How do you prioritize multiple BI requests?
👉 Looking for: communication, problem-solving, stakeholder management.
10. Behavioral & Soft Skills
46. Describe a time you worked with non-technical stakeholders.
47. How do you explain complex data insights to executives?
48. How do you handle tight deadlines?
49. Describe a BI project that failed and what you learned.
50. Why should we hire you as a BI Development & Operations
Specialist?
👉 Looking for: teamwork, communication, growth mindset.
Bonus: Common Follow-Up Questions
What BI tools are you strongest in and why?
How do you stay updated with BI technologies?
What KPIs would you design for this organization?
🎯 Want More Help?
I can:
Provide model answers to each question
Run a mock interview (technical + HR)
Tailor questions to Power BI–focused, UN/NGO, or government
roles
Create cheat-sheet answers for quick revision
Just tell me how you want to prepare.
provide model answers to each question and next step
Below are clear, professional model answers for all 50 interview
questions for Specialist – Business Intelligence Development &
Operations, followed by next-step preparation guidance.
These answers are written in a way you can adapt to your own
experience and confidently deliver in interviews.
MODEL ANSWERS – Specialist: Business Intelligence Development &
Operations
1. General & Conceptual BI
1. What is Business Intelligence, and how does it support decision-
making?
Business Intelligence is the process of collecting, transforming, analyzing,
and visualizing data to support informed decision-making. BI provides timely,
accurate insights that help organizations monitor performance, identify
trends, reduce risks, and optimize operations.
2. Difference between operational and analytical reporting?
Operational reporting focuses on day-to-day activities and real-time or near–
real-time data, such as daily transactions. Analytical reporting focuses on
historical data, trends, and performance analysis for strategic decision-
making.
3. Role of BI in organizational performance management?
BI enables performance tracking through KPIs, dashboards, and scorecards. It
helps management measure progress against goals, identify gaps, and take
corrective actions based on data rather than assumptions.
4. How do you translate business requirements into BI solutions?
I start by understanding business objectives and KPIs, then identify data
sources, define metrics, design data models, and develop dashboards. I
validate results with stakeholders and refine the solution iteratively.
5. What KPIs have you designed and their impact?
I have designed KPIs such as revenue growth, customer retention,
operational efficiency, and service turnaround time, which helped
management track performance and improve decision-making accuracy.
2. BI Development & Dashboard Design
6. BI dashboard development process?
Requirement gathering → data source analysis → data modeling → dashboard
design → validation → deployment → monitoring and support.
7. Designing dashboards for executives vs operational users?
Executives need high-level KPIs and trends, while operational users need
detailed, actionable data. I tailor visuals, filters, and drill-downs accordingly.
8. Data visualization principles you follow?
Clarity, simplicity, consistency, correct chart selection, minimal clutter, and
focusing on key insights.
9. Handling changing requirements after deployment?
I assess the impact, prioritize changes, update documentation, and apply
changes in a controlled manner to avoid disrupting existing users.
10. Challenging BI project and solution?
A project with inconsistent data definitions. I worked with stakeholders to
standardize KPIs and implemented a single semantic model to ensure
consistency.
3. Power BI / BI Tools
11. Power BI Desktop vs Service?
Desktop is for report development; Service is for publishing, sharing,
scheduling refreshes, and collaboration.
12. What is DAX?
DAX is a formula language used to create calculated measures and columns,
such as YTD sales, growth percentages, and moving averages.
13. How do you optimize Power BI performance?
Efficient data modeling, reducing columns, using measures instead of
calculated columns, optimizing DAX, and proper indexing in source
databases.
14. Row-Level Security (RLS)?
RLS restricts data access based on user roles, ensuring users only see
authorized data.
15. Dataset refresh and gateways?
I configure scheduled refreshes and use on-premises data gateways for
secure connectivity to local data sources.
4. Data Modeling & Warehousing
16. What is a star schema?
A data model with fact tables connected to dimension tables, optimized for
BI queries and performance.
17. Fact vs dimension tables?
Fact tables store measurable data; dimension tables store descriptive
attributes.
18. Slowly Changing Dimensions?
Techniques to manage changes in dimension data over time, such as Type 1
(overwrite) and Type 2 (history tracking).
19. Ensuring data consistency across reports?
Using centralized datasets, shared semantic models, and standardized KPI
definitions.
20. Experience with data warehouses?
I have supported data warehouse design and used warehouse structures for
BI reporting and analytics.
5. SQL & Data Analysis
21. SQL for top 5 products by sales?
SELECT product, SUM(sales) AS total_sales
FROM sales_table
GROUP BY product
ORDER BY total_sales DESC
LIMIT 5;
22. Optimizing slow SQL queries?
Indexing, query rewriting, reducing joins, analyzing execution plans.
23. Indexes and when not to use them?
Indexes improve read performance but can slow writes and consume storage
—avoid over-indexing.
24. INNER JOIN vs LEFT JOIN?
INNER JOIN returns matching records; LEFT JOIN returns all left-table records
plus matches.
25. Validating data accuracy?
Cross-checking with source systems, reconciliation checks, and stakeholder
validation.
6. BI Operations & Support
26. What is BI operations?
Ensuring BI systems are reliable, secure, performant, and available for users.
27. Monitoring BI performance?
Monitoring refresh logs, usage metrics, query performance, and user
feedback.
28. Handling failed refresh?
Identify root cause, fix data or connectivity issues, re-run refresh, and inform
stakeholders.
29. Managing user access?
Using role-based access, RLS, and least-privilege principles.
30. Ensuring BI availability?
Proper scheduling, monitoring, backups, and documentation.
7. Data Quality, Governance & Security
31. Ensuring data quality?
Validation rules, reconciliation, monitoring, and governance standards.
32. Data governance practices?
Defined ownership, standard KPIs, metadata documentation, and access
control.
33. Handling sensitive data?
Encryption, access restrictions, masking, and compliance with policies.
34. Importance of metadata?
Improves understanding, reuse, and consistency of BI assets.
35. Version control for BI assets?
Using Git or structured versioning and deployment processes.
8. Automation & Optimization
36. Automated BI processes?
Automated refreshes, report subscriptions, and SQL-based data preparation.
37. Reducing manual reporting?
Dashboards, scheduled refreshes, and self-service BI.
38. Automation tools used?
SQL, Power Automate, Python, Power BI Service features.
39. Alerts and subscriptions?
Configured in BI tools for threshold-based notifications.
40. Measuring BI effectiveness?
User adoption, reduced manual work, decision impact, and performance
improvements.
9. Scenario-Based
41. Manager says numbers are wrong?
I verify data sources, calculations, explain findings, and correct issues
transparently.
42. Slow report during peak hours?
Optimize queries, caching, and refresh schedules.
43. Real-time data request?
Assess feasibility, propose near-real-time solutions, balance performance and
cost.
44. Conflicting KPI definitions?
Facilitate alignment workshops and establish standard definitions.
45. Prioritizing BI requests?
Based on business impact, urgency, and resource availability.
10. Behavioral
46. Working with non-technical stakeholders?
I use simple language and visual explanations.
47. Explaining insights to executives?
Focus on key messages, trends, and business impact.
48. Handling tight deadlines?
Prioritization, clear communication, and incremental delivery.
49. Failed BI project?
I learned the importance of requirement validation and stakeholder
alignment.
50. Why should we hire you?
I combine strong BI development skills with operational reliability and
stakeholder collaboration.
NEXT STEPS – HOW TO PREPARE STRONGLY
✅ 1. Customize Answers
Replace generic examples with your real projects, tools, and metrics.
✅ 2. Prepare STAR Stories
Have 3–5 real BI project stories ready (Situation, Task, Action, Result).
✅ 3. Revise Key Technical Areas
Power BI (DAX, RLS, performance)
SQL optimization
Data modeling
BI operations & support
✅ 4. Mock Interview
Practice aloud or ask me to run a full mock interview (technical + HR).
✅ 5. Align With Job Description
I can tailor answers exactly to a specific vacancy (government, NGO, UN,
private).
If you want, next I can:
Run a live mock interview
Create short memorization answers
Prepare technical test questions
Tailor answers to Power BI–focused roles
Just tell me your next step.
Rewrite it for safaricom
Below is a Safaricom-tailored rewrite of the model interview answers
for Specialist – Business Intelligence Development & Operations.
I’ve aligned the language, examples, and priorities to telecom scale,
customer experience, network performance, revenue assurance, and
M-Pesa–like digital services.
MODEL ANSWERS – Safaricom Context
(Use these as talking points; personalize with your real tools and projects.)
1. General & Conceptual BI
1. What is Business Intelligence, and how does it support decision-
making at Safaricom?
Business Intelligence transforms large volumes of telecom and digital service
data into insights that support strategic and operational decisions. At
Safaricom, BI enables monitoring of customer experience, network
performance, revenue, churn, and digital services adoption, helping
leaders act quickly and accurately.
2. Operational vs analytical reporting in telecom?
Operational reporting supports near–real-time monitoring such as network
uptime, call drop rates, and transaction failures. Analytical reporting
focuses on trends like ARPU, churn, customer lifetime value, and
service adoption for long-term planning.
3. Role of BI in performance management?
BI provides KPI dashboards for revenue growth, customer satisfaction,
network availability, and service quality, enabling management to track
targets and optimize performance across business units.
4. Translating business needs into BI solutions?
I start with business goals such as reducing churn or improving service
reliability, define KPIs, identify data sources (billing, CRM, network
systems), model the data, and deliver dashboards validated with
stakeholders.
5. KPIs relevant to Safaricom?
KPIs such as ARPU, churn rate, customer acquisition cost, service
availability, transaction success rate, and regional performance,
which help management improve customer retention and operational
efficiency.
2. BI Development & Dashboard Design
6. BI dashboard development process?
Requirements → data source mapping (network, billing, CRM) → data
modeling → dashboard design → validation with business teams →
deployment → continuous monitoring.
7. Dashboards for executives vs operations?
Executives get high-level KPIs and trends, while operations teams get
detailed drill-downs by region, service, or time for faster issue
resolution.
8. Visualization principles?
Clarity, simplicity, consistent KPI definitions, and visuals that highlight
exceptions and performance gaps.
9. Handling changing requirements?
I assess business impact, update KPIs or models carefully, communicate
changes, and deploy improvements without disrupting live operations.
10. Challenging BI project?
Integrating data from multiple systems with inconsistent definitions. I
standardized metrics and built a single semantic layer to ensure trusted
reporting.
3. BI Tools (Power BI Focus)
11. Power BI Desktop vs Service?
Desktop is for building reports; Service is for secure publishing,
scheduling refreshes, managing access, and monitoring usage.
12. DAX examples?
Measures like monthly ARPU, churn percentage, YTD revenue growth,
and rolling averages for performance tracking.
13. Performance optimization?
Efficient star schemas, optimized DAX, reducing data volume, and improving
source query performance—critical for large telecom datasets.
14. Row-Level Security?
Used to restrict access by region, department, or role, ensuring data
confidentiality.
15. Dataset refresh and gateways?
Configured scheduled refreshes and gateways to securely connect on-
premise systems with Power BI Service.
4. Data Modeling & Warehousing
16. Star schema importance?
It improves performance and scalability, essential for high-volume telecom
analytics.
17. Fact vs dimension tables?
Facts store metrics like usage or revenue; dimensions store descriptive
attributes like customer, region, or service type.
18. Slowly Changing Dimensions?
Used to track changes such as customer status, tariff plans, or region
reclassification.
19. Ensuring consistency?
Centralized datasets and standardized KPI definitions across departments.
20. Data warehouse experience?
I have supported warehouse-based reporting and analytics to ensure scalable
and reliable BI.
5. SQL & Data Analysis
21. SQL for top 5 products by revenue?
I use aggregation, grouping, and indexing to efficiently analyze large
datasets.
22. Optimizing slow queries?
Indexing, reducing unnecessary joins, query refactoring, and execution plan
analysis.
23. Index usage?
Indexes improve read performance but must be balanced to avoid write
overhead.
24. INNER vs LEFT JOIN?
INNER returns matches only; LEFT returns all records from the main table.
25. Data accuracy validation?
Reconciliation with source systems and business validation.
6. BI Operations & Support
26. BI operations at Safaricom?
Ensuring BI platforms are available, accurate, secure, and performant
for continuous business monitoring.
27. Monitoring BI systems?
Refresh logs, usage metrics, performance dashboards, and user feedback.
28. Failed refresh handling?
Identify root cause, fix data or connectivity issues, re-run refresh, and
communicate clearly.
29. Access management?
Role-based access control and least-privilege principles.
30. Ensuring availability?
Monitoring, documentation, backup strategies, and proactive issue
management.
7. Data Quality, Governance & Security
31. Data quality assurance?
Validation rules, automated checks, and governance standards.
32. Governance practices?
Clear data ownership, standardized KPIs, metadata documentation.
33. Handling sensitive data?
Access controls, masking, encryption, and policy compliance.
34. Metadata importance?
Ensures consistent understanding and reuse of BI assets.
35. Version control?
Structured versioning and controlled deployment.
8. Automation & Optimization
36. BI automation?
Automated refreshes, subscriptions, and alerts.
37. Reducing manual reporting?
Self-service dashboards and scheduled reporting.
38. Automation tools?
SQL, Power BI Service features, Power Automate.
39. Alerts?
Configured for thresholds like network outages or revenue drops.
40. Measuring BI effectiveness?
User adoption, decision impact, reduced manual workload.
9. Scenario-Based
41. Numbers disputed?
Validate data, explain logic clearly, correct transparently.
42. Slow reports?
Optimize model, queries, and refresh schedules.
43. Real-time data requests?
Propose near–real-time solutions balancing performance and cost.
44. KPI conflicts?
Facilitate alignment and standardize definitions.
45. Prioritization?
Based on business impact, urgency, and strategic value.
10. Behavioral
46. Non-technical stakeholders?
Simple explanations and visuals.
47. Executives?
Focus on insights, trends, and business impact, not technical detail.
48. Tight deadlines?
Clear priorities and incremental delivery.
49. Failed project lesson?
Importance of early stakeholder alignment.
50. Why Safaricom should hire you?
I combine strong BI development skills, operational reliability, and
the ability to turn complex telecom data into actionable insights that
support customer experience and business growth.
NEXT STEPS – SAFARICOM INTERVIEW PREP
✅ 1. Learn Safaricom KPIs
ARPU, churn, customer experience, network uptime, digital services
performance.
✅ 2. Prepare 3 Real Stories
Preferably involving large datasets, operations support, and
performance dashboards.
✅ 3. Practice Power BI Deeply
DAX, RLS, performance tuning, service administration.
✅ 4. Mock Interview
I can run a Safaricom-style technical + behavioral mock interview.
✅ 5. Align With Job Ad
I can tailor answers line by line to Safaricom’s vacancy.
If you want, say “Run Safaricom mock interview” and I’ll start
immediately.
Run a mock interview (technical + HR)
Great — let’s run a full mock interview for Safaricom
Role: Specialist – Business Intelligence Development & Operations
Format: Technical + HR (just like a real panel interview)
🧑💼 Interview Setup
I’ll act as the Safaricom interview panel
You answer as the candidate
After each answer, I’ll give brief feedback and move to the next
question
At the end, I’ll give you a scorecard + improvement tips
👉 Answer naturally, in your own words. Short but structured answers are
best (1–2 minutes each).
SECTION 1: INTRODUCTION (HR + Technical)
Question 1
Please introduce yourself and explain why you are interested in the
Specialist – Business Intelligence Development & Operations role at
Safaricom.
(You may start now. When you finish, I’ll continue with the next question.)
could give me the answer
Of course. Below is a strong, interview-ready model answer tailored
specifically for Safaricom. You can memorize it and slightly personalize it
with your exact years or tools.
Model Answer – Question 1
“Please introduce yourself and explain why you are interested in
the Specialist – Business Intelligence Development & Operations
role at Safaricom.”
Answer:
Thank you for the opportunity. My name is Girmay Gerezgiher
Gereyohans, and I am a Business Intelligence professional with a strong
background in BI development, data analysis, and BI operations
support. I hold a Master’s degree in Information Technology and have
hands-on experience designing dashboards, developing data models, and
supporting reliable BI systems that enable data-driven decision-making.
In my work, I have used tools such as Power BI, SQL, and data
integration techniques to transform complex datasets into clear and
actionable insights for both technical and non-technical stakeholders. I have
also supported BI operations by managing data refreshes, monitoring report
performance, handling access control, and ensuring data quality and
availability.
I am particularly interested in this role at Safaricom because of its
leadership in telecommunications and digital services, where data plays
a critical role in improving customer experience, network performance,
and revenue growth. The combination of BI development and
operational responsibility in this role strongly aligns with my skills and
career goals.
I am motivated by opportunities where I can work with large-scale, high-
impact data, collaborate across teams, and contribute to solutions that
directly support strategic and operational objectives. I believe my technical
skills, analytical mindset, and commitment to reliable BI delivery would allow
me to add value to Safaricom from day one.
🔑 Tips for Delivery
Keep your tone confident and calm
Maintain eye contact (if in person or video)
Emphasize Safaricom, data scale, and impact
If asked, be ready to give one concrete example
If you want, next I can:
Continue the mock interview (Question 2 – Technical)
Shorten this to a 1-minute version
Customize it further with your exact experience
Prepare final “Why Safaricom?” follow-up answers
Just say “Next question” and we’ll continue.
why safaicom
Here is a strong, concise, interview-ready model answer to “Why
Safaricom?”, tailored for a Specialist – Business Intelligence
Development & Operations role. You can use it exactly as is or slightly
personalize it.
Model Answer: Why Safaricom?
Safaricom stands out to me because it is not only a market leader in
telecommunications, but also a technology and digital services
company where data is central to every decision. From network
operations and customer experience to revenue assurance and digital
platforms, Safaricom operates at a scale where business intelligence has
real, measurable impact.
I am particularly drawn to Safaricom’s focus on innovation, reliability, and
customer-centric services. Managing high-volume, real-time data requires
strong BI development and dependable BI operations, which aligns perfectly
with my skills in dashboard development, data modeling, performance
optimization, and operational support.
Additionally, Safaricom’s culture of continuous improvement and cross-
functional collaboration is very important to me. I enjoy working closely
with business, technical, and operational teams to turn complex data into
clear insights that support strategic and operational decisions.
I see this role as an opportunity to contribute to Safaricom’s mission by
ensuring that decision-makers have accurate, timely, and trusted
insights, while also growing professionally in a challenging, high-impact
environment.
🔑 Interview Tips
Mention impact, scale, and customer experience
Avoid generic praise—focus on data and BI relevance
Keep it under 1–1.5 minutes
If you want, I can:
Provide a short 30-second version
Prepare a follow-up answer if they ask “Why should we hire you
instead of others?”
Continue the mock interview
Just tell me the next step.
next question
Great, let’s continue the Safaricom mock interview.
Question 2 – Technical (Core BI)
Can you walk us through how you would design and deliver a
Business Intelligence dashboard at Safaricom, from requirement
gathering to deployment and ongoing operations?
(Take your time. After your answer, I’ll give feedback and move to the next
question. If you prefer, I can also provide a model answer.)
provide the answer
Here is a clear, structured, interview-ready model answer tailored
specifically for Safaricom. You can use this almost word-for-word.
Model Answer – Question 2
“How would you design and deliver a Business Intelligence
dashboard at Safaricom, from requirement gathering to deployment
and ongoing operations?”
Answer:
I would approach the dashboard development in a structured and
collaborative way, especially considering Safaricom’s scale and data
complexity.
First, I would start with requirement gathering by engaging key
stakeholders such as business owners, operations teams, and management
to clearly understand the business objective, for example improving
customer experience, monitoring network performance, or tracking revenue.
At this stage, I would define the key KPIs, reporting frequency, target users,
and success criteria.
Second, I would perform data source analysis, identifying relevant systems
such as billing, CRM, network, or digital service platforms. I would assess
data quality, granularity, and refresh requirements, and work with data
engineers or database teams if integration or transformation is required.
Third, I would move to data modeling, designing an efficient star schema
with fact and dimension tables to support performance and scalability. I
would create a centralized semantic model to ensure consistent KPI
definitions across reports.
Fourth, I would develop the dashboard using Power BI, applying best
practices in data visualization—clear layout, appropriate chart types, drill-
downs, and filters tailored to different user roles. I would also implement
row-level security where required to protect sensitive or regional data.
Before deployment, I would conduct validation and user acceptance
testing, reconciling results with source systems and reviewing insights with
stakeholders to confirm accuracy and relevance.
For deployment, I would publish the report to Power BI Service, configure
scheduled refreshes and gateways, manage user access, and set up
subscriptions or alerts for critical KPIs.
Finally, for ongoing operations, I would monitor refresh status,
performance metrics, and usage statistics, provide user support, and
continuously improve the dashboard based on feedback and evolving
business needs. This ensures the BI solution remains reliable, trusted, and
valuable over time.
🔑 Why This Answer Works for Safaricom
Shows end-to-end BI ownership
Emphasizes operations and reliability, not just development
Mentions telecom-relevant systems and KPIs
Demonstrates collaboration and governance
When you’re ready, say “Next question” and we’ll continue with a Power
BI / DAX technical question.
next question
Perfect, let’s continue.
Question 3 – Technical (Power BI & DAX)
How do you optimize the performance of Power BI reports and
datasets, especially when working with large-scale data such as
Safaricom’s telecom and digital services data?
(You can answer now, or say “Provide the answer” and I’ll give you a
model response.)
Provide the answer
Here is a strong, Safaricom-specific model answer you can confidently
use in the interview.
Model Answer – Question 3
“How do you optimize the performance of Power BI reports and
datasets, especially with large-scale data like Safaricom’s?”
Answer:
When working with large-scale telecom and digital services data, I focus on
performance optimization across data modeling, DAX, data volume, and
operations.
First, at the data modeling level, I design a clean star schema with clear
fact and dimension tables. I remove unnecessary columns, use appropriate
data types, and avoid bi-directional relationships unless absolutely
necessary. This reduces model complexity and improves query performance.
Second, I optimize data volume and refresh strategy. Instead of
importing raw transactional data, I aggregate data at the required grain and,
where appropriate, use incremental refresh. This is especially important
for large datasets such as call records, transactions, or usage data.
Third, I focus on DAX optimization. I prefer measures over calculated
columns, avoid complex row-by-row calculations, and use variables to make
measures more efficient and readable. I also test DAX using performance
analyzer tools to identify bottlenecks.
Fourth, I ensure efficient source queries by pushing transformations back
to the database whenever possible, using optimized SQL queries and indexed
columns. This reduces load on Power BI and improves refresh performance.
From an operational perspective, I monitor refresh logs, dataset size, and
usage metrics in Power BI Service. I schedule refreshes during off-peak hours
and configure alerts for failures to ensure high availability and reliability.
Overall, my goal is to ensure that reports remain fast, scalable, and
reliable, even as data volume and user demand grow, which is critical in a
high-traffic environment like Safaricom.
🔑 Interview Tips
Emphasize scale and reliability
Mention incremental refresh, star schema, DAX optimization
Show you think about operations, not just development
Say “Next question” and we’ll move to a scenario-based telecom BI
question, which Safaricom often asks.
next question
Great! Let’s move to a scenario-based question, which Safaricom loves to
ask.
Question 4 – Scenario-Based
Suppose a regional operations manager reports that the KPI
dashboard shows unusually high network downtime in one region.
How would you investigate and resolve this issue?
(You can answer now, or say “Provide the answer” and I’ll give you a
model response.)
provide the answer
Here’s a strong, structured model answer tailored for Safaricom:
Model Answer – Question 4
Scenario: Regional operations manager reports unusually high network
downtime on the KPI dashboard.
Answer:
First, I would acknowledge the issue and gather details from the manager:
which region, time period, and KPI definition they are referring to.
Second, I would validate the data on the dashboard. I would check the
underlying datasets, ETL processes, and source systems to confirm whether
the spike reflects actual downtime or if it is caused by data errors, delayed
refreshes, or incorrect mappings.
Third, I would analyze the root cause. For example:
Check network monitoring logs for actual outages
Review ETL or data integration jobs for failures or delays
Confirm whether any maintenance activities may have affected the
data
Fourth, I would communicate findings with stakeholders. If the issue is
data-related, I would correct the dataset, update the dashboard, and
implement measures to prevent recurrence. If the downtime is real, I would
escalate it to the network operations team for remediation.
Finally, I would document the incident, update KPIs if needed, and set up
automated alerts for similar anomalies in the future to ensure proactive
monitoring.
Key takeaway: My approach balances data validation, analysis,
stakeholder communication, and operational follow-up, ensuring that
Safaricom’s dashboards remain accurate, reliable, and actionable.
🔑 Tips
Show structured investigation steps
Highlight data validation first, then operational escalation
Emphasize proactive monitoring
Say “Next question” and we’ll continue with a behavioral HR question.
next question
Great! Let’s move to a behavioral HR question, which Safaricom typically
includes.
Question 5 – Behavioral / HR
Describe a time when you had to explain complex BI insights to non-
technical stakeholders. How did you ensure they understood and
acted on your recommendations?
(You can answer now, or say “Provide the answer” and I’ll give you a
model response.)
provide answer
Here’s a strong, Safaricom-tailored model answer for that behavioral
question:
Model Answer – Question 5
Question: Describe a time you explained complex BI insights to non-
technical stakeholders.
Answer:
In my previous role, I developed a Power BI dashboard tracking
customer churn and service usage patterns. When presenting to the
management team, I realized that some stakeholders were not familiar with
technical terms like “data granularity” or “rolling averages.”
To ensure clarity, I focused on the business impact rather than the
technical details. I used simple visuals, color-coded KPIs, and highlighted
trends and exceptions. For example, instead of showing raw churn
calculations, I presented “Customer churn increased by 12% in the
West region this quarter, impacting revenue by X%”, and suggested
actionable steps.
I also provided drill-down options for those who wanted more detail, so
technical team members could explore the data without overwhelming non-
technical users.
As a result, stakeholders quickly understood the insights, prioritized
actions to improve customer retention, and adopted the dashboard as part of
their regular decision-making process.
Key takeaway: Clear communication, visual storytelling, and tailoring
insights to the audience are essential for BI impact.
🔑 Tips
Emphasize business impact, not technical complexity
Mention visuals, dashboards, and actionable insights
Keep it 1–2 minutes
If you want, we can continue the mock interview with another technical
scenario, such as optimizing BI performance under high data volume,
or move to “Why should we hire you?” for Safaricom.
Do you want to continue with technical or HR/closing questions next?
continue
Perfect! Let’s continue with a technical scenario question, which is very
common for Safaricom BI roles.
Question 6 – Technical / Scenario-Based
Safaricom is launching a new digital service, and you are asked to
create a dashboard that tracks adoption, transaction volume, and
revenue in real-time. How would you design the dashboard to
handle large volumes of data efficiently while ensuring accuracy and
reliability?
(You can answer now, or say “Provide the answer” and I’ll give you a
model response.)
provide answer
Here’s a strong, Safaricom-specific model answer for this scenario:
Model Answer – Question 6
Question: Designing a real-time dashboard for a new digital service with
large data volumes.
Answer:
To design a real-time adoption and revenue dashboard for Safaricom’s
new digital service, I would take a structured approach:
1. Requirement Gathering:
Engage stakeholders to define key KPIs—adoption rate, transaction
volume, revenue, user demographics, and alert thresholds.
Identify which metrics need near-real-time updates versus aggregated
trends.
2. Data Source Identification & Modeling:
Determine all relevant sources—billing systems, transaction logs, CRM,
and app usage data. I would design a star schema or a hybrid
model optimized for reporting, aggregating transactional data at the
required level to reduce volume without losing critical detail.
3. ETL & Data Integration:
Use ETL pipelines or streaming solutions (e.g., Azure Data Factory,
Kafka, or incremental refresh in Power BI) to load and transform
large datasets efficiently. Apply data validation and quality checks to
ensure reliability.
4. Dashboard Design:
o Build interactive Power BI dashboards with visualizations
that highlight KPIs, trends, and exceptions.
o Use aggregated views for executives and drill-downs for
operations teams.
o Implement row-level security and role-based access for
sensitive revenue data.
5. Performance Optimization:
o Use aggregations, measures instead of calculated
columns, and incremental refresh to handle high volumes.
o Optimize DAX queries and reduce unnecessary visuals.
o Push heavy transformations to the database whenever possible.
6. Operational Monitoring:
o Schedule automated refreshes and alerts for data anomalies.
o Continuously monitor performance and adjust models as data
volume grows.
o Document all data sources, KPIs, and processes for auditability.
Outcome:
This approach ensures that the dashboard is accurate, reliable, and
scalable, enabling Safaricom’s management and operations teams to track
service adoption, transaction performance, and revenue in real-time, while
maintaining system performance.
🔑 Tips
Highlight data scale, reliability, and performance
Emphasize incremental refresh, aggregation, and real-time
monitoring
Show you think about both technical and operational aspects
If you want, the next question can be a behavioral closing question, like
“Why should we hire you?” or we can continue with technical
questions on DAX/SQL optimization.
Do you want to continue with HR closing or technical?
continue
Perfect! Let’s move to a closing HR / behavioral question, which
Safaricom commonly asks in final rounds.
Question 7 – HR / Closing
Why should we hire you for the Specialist – Business Intelligence
Development & Operations role at Safaricom?
Here’s a strong, tailored model answer:
Model Answer – Question 7
Answer:
I believe I am a strong fit for this role because I bring a combination of
technical expertise, operational reliability, and business-focused
insight.
Technical Expertise: I have hands-on experience in Power BI, SQL,
data modeling, DAX optimization, and ETL processes, which
enables me to design dashboards and reports that are accurate,
scalable, and actionable.
Operational Reliability: I have managed BI operations, including
dataset refreshes, user access, performance monitoring, and
troubleshooting, ensuring reports are always trusted and available,
which is critical for a high-traffic environment like Safaricom.
Business Impact: I focus on turning complex data into clear
insights that support strategic and operational decisions, whether for
customer experience, network performance, or revenue monitoring.
Collaboration and Adaptability: I have worked with cross-
functional teams, translating technical insights into business action,
and adapting quickly to evolving requirements—skills that align with
Safaricom’s innovative and fast-paced environment.
I am confident that my combination of BI development skills, operational
excellence, and business understanding will allow me to deliver value
from day one and support Safaricom in achieving its strategic objectives.
🔑 Tips
Focus on skills + business impact + Safaricom context
Keep it under 90 seconds
Convey confidence without arrogance
If you want, I can now:
1. Compile all mock questions and model answers into a single
“Safaricom BI Interview Prep Sheet”
2. Run a timed full mock interview simulation where you answer and
I give feedback in real-time
Which one do you want to do next?
mock interview with another technical scenario
Perfect! Let’s continue with another technical scenario, focused on
Safaricom-scale BI operations and development.
Question 8 – Technical / Scenario-Based
A Safaricom executive reports that the monthly revenue dashboard
shows a sudden drop in M-Pesa transaction revenue for one region.
How would you investigate the issue and ensure the dashboard
shows accurate and reliable data?
You can answer now, or say “Provide the answer” and I’ll give a full model
response.
provide answer
Here’s a structured, Safaricom-specific model answer for this scenario:
Model Answer – Question 8
Question: Sudden drop in M-Pesa transaction revenue on the dashboard for
one region. How would you investigate and ensure data accuracy?
Answer:
First, I would acknowledge the issue and gather context from the
executive: which region, time period, and dashboard metrics are showing the
drop.
Step 1 – Validate the data:
Check the underlying source systems (M-Pesa transaction logs,
billing, and CRM) to confirm whether the drop is real or a data
reporting issue.
Review ETL pipelines, dataset refresh logs, and Power BI connections
for errors or delays that could cause inaccurate reporting.
Step 2 – Analyze the root cause:
If it is data-related, identify the specific ETL failure, missing
transaction batch, or mapping issue and correct it.
If the drop is real, analyze transactional data to identify patterns—such
as service outages, unusual customer behavior, or system
maintenance.
Step 3 – Communicate findings:
Provide a clear explanation to stakeholders, including whether the drop
is actual or a reporting anomaly, and the corrective actions taken.
Step 4 – Prevent recurrence:
Implement automated alerts for significant deviations in revenue
or transactions.
Ensure dashboards have built-in validation checks and maintain
logs for auditing.
Step 5 – Continuous monitoring:
Monitor the region’s transaction data for several days to confirm
recovery or trends.
Document lessons learned for the BI team to improve data reliability
and reporting processes.
Outcome:
This approach ensures that Safaricom’s dashboards are accurate,
trustworthy, and actionable, enabling executives to make informed
decisions quickly.
🔑 Tips for Delivery
Emphasize structured investigation: validation → analysis →
communication → prevention.
Highlight both technical troubleshooting and business impact.
Show awareness of real-time monitoring and alerting, important
for telecom-scale operations.
If you want, the next question can be about optimizing a large-scale BI
report or dashboard—another common Safaricom technical scenario.
Do you want to continue with that?
continue
Great! Let’s continue with another technical scenario, focused on
optimizing large-scale BI dashboards for Safaricom.
Question 9 – Technical / Scenario-Based
You are tasked with optimizing a large Power BI dashboard used to
monitor network performance across multiple regions. Users
complain that the report is slow, especially during peak hours. How
would you improve performance while maintaining accurate
insights?
You can answer now, or say “Provide the answer” and I’ll give you a
structured model response.
provide answer
Here’s a structured, Safaricom-specific model answer for this scenario:
Model Answer – Question 9
Question: Large Power BI dashboard monitoring network performance is
slow during peak hours. How would you optimize it?
Answer:
When optimizing a large-scale dashboard, I follow a structured approach
focusing on data modeling, queries, DAX, and operational efficiency:
1. Data Modeling Optimization:
Ensure the dashboard uses a star schema with fact and dimension
tables, reducing unnecessary joins.
Remove unused columns and tables to minimize data volume.
Aggregate data at the appropriate level for dashboard visuals, rather
than using raw transactional data.
2. DAX and Calculations:
Replace calculated columns with measures wherever possible.
Use variables in DAX to reduce repeated calculations.
Optimize slow measures by analyzing the Performance Analyzer and
rewriting inefficient formulas.
3. Data Source & Queries:
Push heavy computations to the database with optimized SQL
queries or stored procedures.
Use indexes or pre-aggregated tables in the source database to speed
up retrieval.
4. Power BI Service Configuration:
Enable incremental refresh for large datasets to minimize full refresh
times.
Reduce the number of visuals per page and avoid unnecessary slicers
or complex visuals that slow rendering.
Schedule refreshes during off-peak hours and monitor refresh logs for
failures.
5. Operational Monitoring:
Continuously track report performance using Power BI Service
metrics.
Set up alerts for slow query execution or failed refreshes.
Document all changes and monitor user feedback to ensure
improvements are effective.
Outcome:
This approach ensures the network performance dashboard is fast,
scalable, and reliable, allowing Safaricom teams to monitor multiple
regions and respond quickly to operational issues without sacrificing
accuracy.
🔑 Tips
Emphasize data modeling and aggregation for large datasets
Highlight DAX optimization and query efficiency
Include operational monitoring—Safaricom values reliability for
high-traffic dashboards
If you want, the next question can focus on data quality and
governance, a critical topic for Safaricom BI roles.
Do you want to continue with that?
next queston
Great! Let’s move to a data quality and governance scenario, which is
critical for Safaricom BI roles.
Question 10 – Technical / Scenario-Based
During a quarterly audit, you discover that some revenue data in
your BI dashboard is inconsistent with the source system. How
would you identify the issue, correct it, and prevent it from
happening in the future?
You can answer now, or say “Provide the answer” and I’ll give you a
structured model response.
provide answer
Here’s a strong, Safaricom-specific model answer for this scenario:
Model Answer – Question 10
Question: Revenue data in your BI dashboard is inconsistent with the source
system. How would you handle it?
Answer:
1. Identify the Issue:
First, I would compare the BI dashboard data with the source
system to pinpoint where discrepancies occur—whether in ETL
processes, transformations, aggregations, or dashboard
calculations.
I would check refresh logs, missing records, and mapping rules
to isolate the problem.
2. Correct the Data:
Once identified, I would fix the data pipeline or transformation
errors, ensuring the corrected data flows into the dashboard.
Validate the corrected dashboard against the source system to confirm
accuracy.
3. Communicate with Stakeholders:
Inform relevant teams (finance, operations, and management) about
the discrepancy, the root cause, and corrective action taken.
Provide a clear explanation of the impact, if any, on prior reports or
decisions.
4. Prevent Recurrence:
Implement data validation checks and automated reconciliation
scripts in the ETL process.
Document data lineage, KPI definitions, and transformations for
auditability.
Set up alerts for anomalies or sudden changes in revenue or other
critical KPIs.
Outcome:
This approach ensures that BI dashboards remain accurate, reliable, and
trusted for decision-making, while preventing similar issues in future
reporting cycles—a critical requirement for Safaricom’s financial and
operational dashboards.
🔑 Tips
Emphasize structured investigation and validation
Highlight communication with stakeholders
Show proactive prevention measures, such as alerts, reconciliation,
and documentation
If you want, the next question can be behavioral: handling multiple
high-priority BI requests, which Safaricom often asks.
Do you want to continue with that?
continue
Perfect! Let’s move to a behavioral / HR scenario, focused on
prioritization and time management.
Question 11 – Behavioral / HR
You receive multiple high-priority BI requests from different
departments at the same time. How would you prioritize and
manage these requests to ensure timely delivery without
compromising quality?
You can answer now, or say “Provide the answer” and I’ll give you a
structured model response.
provide
Here’s a strong, Safaricom-specific model answer for this behavioral
scenario:
Model Answer – Question 11
Question: Multiple high-priority BI requests come in at the same time. How
do you prioritize and manage them?
Answer:
When facing multiple high-priority BI requests, I follow a structured
approach:
1. Assess Business Impact:
I evaluate each request based on its urgency, strategic importance,
and potential impact on revenue, customer experience, or
operational performance. For example, a dashboard supporting
network outage monitoring may take priority over routine
reporting.
2. Communicate and Set Expectations:
I discuss timelines with stakeholders, clarify priorities, and ensure all
requesters understand expected delivery schedules. This prevents
misunderstandings and sets realistic expectations.
3. Break Down Tasks and Allocate Time:
I divide requests into manageable tasks, focusing on quick wins first if
they provide immediate value.
For larger tasks, I schedule incremental deliveries so stakeholders can
start using insights even before the full solution is ready.
4. Leverage Automation and Reuse:
Where possible, I reuse existing datasets, measures, or
templates to reduce development time without compromising quality.
I also automate recurring tasks, like scheduled refreshes or alerts, to
free up time for new requests.
5. Continuous Monitoring and Feedback:
I track progress and provide updates to stakeholders, making
adjustments as new priorities emerge.
After delivery, I gather feedback to improve processes for future
requests.
Outcome:
This structured approach ensures that high-priority BI requests are handled
efficiently, accurately, and transparently, supporting Safaricom’s
decision-making while maintaining the trust of multiple stakeholders.
🔑 Tips
Emphasize business impact over technical effort
Highlight communication and expectation management
Show efficiency through reuse and automation
If you want, the next question can be a behavioral closing question like:
“Tell us about a BI project you are most proud of and the impact it
had.”
Do you want to continue with that?
continue
Great! Let’s move to a behavioral closing question, which is common in
Safaricom interviews.
Question 12 – Behavioral / HR
Tell us about a BI project you are most proud of and the impact it
had.
Here’s a model, Safaricom-tailored answer:
Model Answer – Question 12
Answer:
One BI project I am most proud of involved designing a customer churn
and retention dashboard for a large service provider. The goal was to
identify at-risk customers and provide actionable insights to reduce churn.
My Approach:
I collaborated with marketing, customer service, and IT teams to
define KPIs, such as churn rate, customer lifetime value, and service
usage patterns.
I built a Power BI dashboard with interactive visuals and drill-downs,
connecting multiple data sources including CRM, billing, and service
logs.
I implemented row-level security so managers could see their
regional data while maintaining confidentiality.
I also set up alerts and automated reports to notify the team when
churn risk exceeded thresholds.
Impact:
The dashboard allowed management to proactively target at-risk
customers, resulting in a 10–15% reduction in churn over three
months.
It also improved cross-team collaboration, as all stakeholders had a
single source of truth.
The success of this project reinforced the importance of actionable,
accurate, and timely BI insights.
Why It’s Relevant to Safaricom:
I believe this experience is directly applicable to Safaricom, where large-
scale customer data, digital service adoption, and revenue
monitoring are critical. I can leverage similar approaches to create
dashboards that drive business impact and operational efficiency.
🔑 Tips
Focus on impact metrics (e.g., reduction in churn, revenue
improvement)
Highlight collaboration and technical skills
Link the story to Safaricom’s business context
If you want, the next question can be a final closing HR question:
“Where do you see yourself in 3–5 years at Safaricom?”
Do you want to continue with that?
continue
Great! Let’s move to a final closing HR question, which Safaricom often
asks to assess career alignment and ambition.
Question 13 – HR / Closing
Where do you see yourself in 3–5 years at Safaricom, and how does
this role fit into your career goals?
Here’s a model, Safaricom-tailored answer:
Model Answer – Question 13
Answer:
In the next 3–5 years, I see myself growing into a senior BI or analytics
leadership role at Safaricom, where I can drive data-driven decision-
making across multiple business units.
This Specialist role is a perfect step because it allows me to combine BI
development, data modeling, and operational excellence while
working with high-volume, high-impact data from Safaricom’s telecom
and digital services.
I aim to:
Build robust, scalable BI solutions that enable management to
make strategic decisions faster
Optimize reporting processes and dashboard performance for
large-scale operations
Mentor junior analysts and contribute to BI best practices and
governance across the company
Ultimately, I want to be recognized as someone who turns complex data
into actionable insights that directly support Safaricom’s mission to
deliver reliable, innovative, and customer-centric services, while also
advancing my career in analytics and leadership.
🔑 Tips
Show ambition aligned with the company
Connect current role → skills → future growth
Keep it forward-looking but realistic
✅ At this point, we have run a full Safaricom mock interview covering:
Introduction & “Why Safaricom?”
Technical scenarios (Power BI, SQL, dashboard optimization, real-time
and revenue monitoring)
Behavioral questions (stakeholder communication, prioritization,
successful BI projects)
Closing HR questions (career goals, why hire you)
If you want, I can now:
1. Compile all 13 questions and model answers into a “Safaricom
BI Interview Prep Sheet” ready for print or memorization
2. Run a live timed simulation where I act as the interviewer and you
respond in real-time, then I give feedback
Do you want me to do option 1 (prep sheet) or option 2 (live
simulation) next?
i want a detailed Sql Questions in the role Specialist -Business Intelligence
Development and Operations
Absolutely! For a Specialist – Business Intelligence Development &
Operations role, SQL is a core skill. I’ll provide a comprehensive set of
SQL questions, categorized by topic, with difficulty levels and context,
tailored to a BI-focused role like Safaricom’s. This will help you prepare for
both technical interviews and practical tests.
SQL Questions for Specialist – BI Development & Operations
1. SQL Basics & Queries
1. Select Statement Basics
o Write a query to select all columns from a table Customers.
o Retrieve only distinct values of Region from Customers.
2. Filtering Data
o Write a query to select all customers with Revenue > 1000.
o Retrieve transactions that occurred in the last 30 days.
3. Sorting & Limiting
o List the top 10 customers by revenue in descending order.
o Retrieve the first 5 highest-value transactions.
4. String and Date Functions
o Find all customers whose names start with ‘A’.
o Convert a string column TransactionDate into YYYY-MM-DD
format.
2. Aggregate Functions & Grouping
5. Basic Aggregates
o Calculate total revenue per region from Transactions.
o Find the average transaction value per customer.
6. GROUP BY & HAVING
o Retrieve regions with total revenue > 1,000,000.
o Count the number of active users per plan and filter where count
> 500.
7. Multiple Aggregates
o Show total, average, minimum, and maximum revenue per
region.
3. Joins & Relationships
8. INNER JOIN
o Combine Customers and Transactions to get CustomerName and
TransactionAmount.
9. LEFT / RIGHT / FULL OUTER JOIN
o Retrieve all customers and their transactions, even if they have
none.
o Show all transactions, including customers that might not exist in
Customers table.
10. Self-Joins
o Find all customers referred by other customers within the same
table.
11. Joining Multiple Tables
o Combine Customers, Transactions, and Plans to show customer
name, plan name, and total transactions.
4. Advanced SQL – BI Focus
12. Window Functions
o Rank customers by revenue within each region.
o Calculate running total of revenue per month.
13. CTEs (Common Table Expressions)
o Write a query using a CTE to calculate total revenue per region,
then select regions with revenue above a threshold.
14. Subqueries
o Find customers whose revenue is above the average revenue.
o Retrieve transactions from customers in the top 10% by revenue.
15. Case Statements
o Categorize customers as ‘High’, ‘Medium’, or ‘Low’ based on
revenue thresholds.
o Flag transactions as ‘Large’ if amount > 1000, else ‘Regular’.
5. Data Transformation & ETL-Style SQL
16. Pivot / Unpivot
o Pivot monthly revenue per customer.
o Unpivot a table of quarterly sales into a long format.
17. Union & Union All
o Combine customer data from two regions into one dataset.
18. Derived Tables
o Calculate total transactions per customer and filter customers
with more than 10 transactions.
19. Incremental Aggregation
o Write a query to aggregate new transactions added in the last
week without recomputing historical data.
6. Performance & Optimization
20. Indexes
o Which columns would you index in a Transactions table for faster
querying by date and customer?
21. Query Optimization
o Identify the most expensive part of a query joining three large
tables.
o Rewrite a query with multiple nested subqueries for efficiency.
22. Partitioning
o Explain how partitioning a Transactions table by month can
improve BI performance.
23. Materialized Views
o Create a materialized view for daily revenue per region to
improve dashboard refresh speed.
7. Scenario-Based SQL Questions (Telecom / BI Focus)
24. Find the top 5 customers by monthly M-Pesa transaction
volume in each region.
25. Retrieve monthly churn rate per plan using historical customer
activity tables.
26. Calculate average ARPU (Average Revenue per User) per
region and highlight regions below the company average.
27. Identify customers with no transactions in the last 3
months but had transactions previously.
28. Determine peak transaction hours from a transaction log table
and rank the hours by volume.
29. Find revenue contribution % of top 10 customers compared to
total revenue.
30. Track slowly changing dimensions in a CustomerPlan table
using Type 2 history tracking.
8. Practical BI SQL Challenge Examples
Build a query that outputs a monthly revenue dashboard table
showing:
o Region
o Total Revenue
o New Customers
o Active Customers
o Churned Customers
Write a query to create a daily alert table where transaction volume
drops by more than 20% compared to the previous day.
Optimize a query that joins Transactions (50M rows), Customers
(5M rows), and Plans (100 rows) for a dashboard visual, ensuring it
runs in under 10 seconds.
🔑 Tips for BI SQL Interviews
1. Always explain your logic while writing queries.
2. Emphasize performance optimization: indexing, aggregations,
filtering at source.
3. Show BI thinking, not just raw SQL syntax — think in terms of
dashboards, KPIs, and data modeling.
4. Use window functions, CTEs, and aggregates for analytical
queries.
5. Be ready to handle large datasets (millions of rows), common in
telecom like Safaricom.
If you want, I can now create a full “BI SQL Interview Question &
Answer Sheet” with:
All these questions answered with ready-to-use SQL queries
Telecom/Safaricom context
Optimizations explained
Do you want me to do that next?
first could you give me a lecture note to this part
Absolutely! I can create a detailed lecture note on SQL for BI
Development & Operations, tailored to a Specialist role like Safaricom’s.
This will cover all the concepts, examples, and best practices. I’ll
structure it like a professional lecture note.
Lecture Note: SQL for Business Intelligence Development &
Operations
1. Introduction
SQL (Structured Query Language) is the backbone of BI development. It
enables analysts and developers to:
Query and manipulate data
Aggregate and summarize information for dashboards
Transform raw data into meaningful insights
Support operational and strategic decision-making
In BI roles, especially at scale (like telecom), SQL is critical for:
Data modeling (fact and dimension tables)
ETL processes (Extract, Transform, Load)
Dashboard performance (optimized queries)
Operational monitoring (accurate, timely insights)
2. SQL Basics
2.1 SELECT Statement
Used to retrieve data from tables.
SELECT CustomerName, Region FROM Customers;
2.2 Filtering Data
WHERE clause filters rows based on conditions.
SELECT * FROM Transactions
WHERE TransactionAmount > 1000
AND TransactionDate >= '2025-01-01';
2.3 Sorting & Limiting
ORDER BY sorts results.
LIMIT / TOP restricts number of rows.
SELECT CustomerName, Revenue
FROM Customers
ORDER BY Revenue DESC
LIMIT 10;
2.4 String & Date Functions
Extract substrings, format dates, etc.
SELECT * FROM Customers
WHERE LEFT(CustomerName,1) = 'A';
SELECT CONVERT(DATE, TransactionDate, 23) AS FormattedDate
FROM Transactions;
3. Aggregations and Grouping
3.1 Aggregate Functions
SUM(), AVG(), MIN(), MAX(), COUNT()
SELECT Region, SUM(Revenue) AS TotalRevenue
FROM Transactions
GROUP BY Region;
3.2 Filtering Aggregates
HAVING filters after aggregation
SELECT Region, COUNT(*) AS ActiveUsers
FROM Customers
GROUP BY Region
HAVING COUNT(*) > 500;
3.3 Multiple Aggregates
SELECT Region,
SUM(Revenue) AS TotalRevenue,
AVG(Revenue) AS AvgRevenue,
MIN(Revenue) AS MinRevenue,
MAX(Revenue) AS MaxRevenue
FROM Transactions
GROUP BY Region;
4. Joins and Relationships
4.1 INNER JOIN
Returns rows that match in both tables
SELECT [Link], [Link]
FROM Customers c
INNER JOIN Transactions t
ON [Link] = [Link];
4.2 OUTER JOIN
LEFT JOIN includes all from left table
SELECT [Link], [Link]
FROM Customers c
LEFT JOIN Transactions t
ON [Link] = [Link];
4.3 Self-Joins
Useful for hierarchical relationships
SELECT [Link] AS Referrer, [Link] AS Referred
FROM Customers a
INNER JOIN Customers b
ON [Link] = [Link];
4.4 Joining Multiple Tables
Combine several tables for a dashboard metric
SELECT [Link], [Link], SUM([Link]) AS
TotalSpent
FROM Customers c
INNER JOIN Plans p ON [Link] = [Link]
INNER JOIN Transactions t ON [Link] = [Link]
GROUP BY [Link], [Link];
5. Advanced SQL for BI
5.1 Window Functions
Calculate rankings, running totals, moving averages
SELECT CustomerID, Revenue,
RANK() OVER(PARTITION BY Region ORDER BY Revenue DESC) AS
RankByRegion
FROM Transactions;
5.2 Common Table Expressions (CTEs)
Simplifies complex queries
WITH RegionalRevenue AS (
SELECT Region, SUM(Revenue) AS TotalRevenue
FROM Transactions
GROUP BY Region
SELECT * FROM RegionalRevenue
WHERE TotalRevenue > 1000000;
5.3 Subqueries
Nested queries for dynamic filtering
SELECT CustomerID, Revenue
FROM Transactions
WHERE Revenue > (SELECT AVG(Revenue) FROM Transactions);
5.4 Case Statements
Categorize data dynamically
SELECT CustomerID,
CASE
WHEN Revenue > 1000 THEN 'High'
WHEN Revenue BETWEEN 500 AND 1000 THEN 'Medium'
ELSE 'Low'
END AS RevenueCategory
FROM Transactions;
6. Data Transformation & BI Techniques
6.1 Pivot / Unpivot
Convert rows to columns or vice versa for reporting
-- Example: pivot monthly revenue per customer
6.2 Union
Combine datasets from multiple sources
SELECT * FROM Customers_Region1
UNION
SELECT * FROM Customers_Region2;
6.3 Incremental Aggregation
Aggregate only new records
SELECT CustomerID, SUM(TransactionAmount) AS WeeklyRevenue
FROM Transactions
WHERE TransactionDate >= DATEADD(DAY, -7, GETDATE())
GROUP BY CustomerID;
7. Performance Optimization
1. Indexes
o Create indexes on frequently queried columns like CustomerID,
TransactionDate.
2. Query Optimization
o Avoid unnecessary joins, use proper filtering, push
transformations to the database.
3. Partitioning
o Split large tables by month, region, or plan for faster access.
4. Materialized Views
o Precompute expensive aggregations for dashboards.
8. Telecom / BI Scenario Examples
Top 5 customers by M-Pesa transaction volume per region
Monthly churn rate per plan
Average ARPU per region
Customers inactive for 3+ months
Peak transaction hours and revenue contribution of top customers
Tip: Always think about scale, accuracy, and dashboard performance in
BI-focused SQL queries.
9. Best Practices for BI SQL
Write clean, readable queries for maintainability
Use aggregates, CTEs, and window functions for analytical
queries
Optimize for performance on large datasets
Ensure data accuracy and consistency for dashboards
Document logic and transformations for governance
✅ This lecture note covers:
SQL basics → advanced queries → BI-focused techniques →
optimization → scenarios
Telecom & BI-specific examples
Best practices for dashboards and operational reporting
If you want, I can next create a **full lecture note with examples + ready-
to-run SQL queries for all the scenario-based BI questions we discussed.
This will be like a practical BI SQL guide for interviews and real
projects.
Do you want me to do that next?
yes
Perfect! I’ll prepare a comprehensive lecture note with practical SQL
examples for a Specialist – Business Intelligence Development &
Operations role. This will include:
SQL concepts for BI
Telecom/BI scenarios (like Safaricom)
Ready-to-run SQL queries
Best practices and optimization tips
Here’s the detailed lecture note:
Lecture Note: Practical SQL for BI Development & Operations
1. Introduction
SQL is essential for BI roles:
Query, aggregate, and transform data
Build dashboards and KPIs
Support operational monitoring and strategic decisions
In telecom/large-scale organizations like Safaricom, BI SQL must handle
millions of transactions, ensure accuracy, and support dashboard
performance.
2. SQL Basics
2.1 Selecting Data
-- Select all columns
SELECT * FROM Customers;
-- Select specific columns
SELECT CustomerID, CustomerName, Region FROM Customers;
-- Distinct values
SELECT DISTINCT Region FROM Customers;
2.2 Filtering Data
-- Transactions above 1000
SELECT * FROM Transactions
WHERE TransactionAmount > 1000;
-- Transactions in last 30 days
SELECT * FROM Transactions
WHERE TransactionDate >= DATEADD(DAY, -30, GETDATE());
2.3 Sorting & Limiting
-- Top 10 customers by revenue
SELECT CustomerID, SUM(Revenue) AS TotalRevenue
FROM Transactions
GROUP BY CustomerID
ORDER BY TotalRevenue DESC
LIMIT 10; -- SQL Server: use TOP 10
2.4 String & Date Functions
-- Customers whose names start with 'A'
SELECT * FROM Customers
WHERE LEFT(CustomerName,1) = 'A';
-- Format transaction date
SELECT CONVERT(VARCHAR, TransactionDate, 23) AS FormattedDate
FROM Transactions;
3. Aggregates and Grouping
-- Total revenue per region
SELECT Region, SUM(Revenue) AS TotalRevenue
FROM Transactions
GROUP BY Region;
-- Average transaction per customer
SELECT CustomerID, AVG(TransactionAmount) AS AvgTransaction
FROM Transactions
GROUP BY CustomerID;
-- Regions with total revenue > 1,000,000
SELECT Region, SUM(Revenue) AS TotalRevenue
FROM Transactions
GROUP BY Region
HAVING SUM(Revenue) > 1000000;
4. Joins and Relationships
-- INNER JOIN: matching rows
SELECT [Link], [Link]
FROM Customers c
INNER JOIN Transactions t
ON [Link] = [Link];
-- LEFT JOIN: include all customers
SELECT [Link], [Link]
FROM Customers c
LEFT JOIN Transactions t
ON [Link] = [Link];
-- Self-join: referrals
SELECT [Link] AS Referrer, [Link] AS Referred
FROM Customers a
INNER JOIN Customers b
ON [Link] = [Link];
-- Multi-table join
SELECT [Link], [Link], SUM([Link]) AS
TotalSpent
FROM Customers c
INNER JOIN Plans p ON [Link] = [Link]
INNER JOIN Transactions t ON [Link] = [Link]
GROUP BY [Link], [Link];
5. Advanced BI SQL
5.1 Window Functions
-- Rank customers by revenue per region
SELECT CustomerID, Region, SUM(Revenue) AS TotalRevenue,
RANK() OVER(PARTITION BY Region ORDER BY SUM(Revenue) DESC) AS
RankByRegion
FROM Transactions
GROUP BY CustomerID, Region;
5.2 CTEs (Common Table Expressions)
WITH RegionalRevenue AS (
SELECT Region, SUM(Revenue) AS TotalRevenue
FROM Transactions
GROUP BY Region
SELECT *
FROM RegionalRevenue
WHERE TotalRevenue > 1000000;
5.3 Subqueries
-- Customers with revenue above average
SELECT CustomerID, SUM(Revenue) AS TotalRevenue
FROM Transactions
GROUP BY CustomerID
HAVING SUM(Revenue) > (SELECT AVG(TotalRevenue)
FROM (SELECT SUM(Revenue) AS TotalRevenue
FROM Transactions
GROUP BY CustomerID) AS Sub);
5.4 Case Statements
SELECT CustomerID, SUM(Revenue) AS TotalRevenue,
CASE
WHEN SUM(Revenue) > 1000 THEN 'High'
WHEN SUM(Revenue) BETWEEN 500 AND 1000 THEN 'Medium'
ELSE 'Low'
END AS RevenueCategory
FROM Transactions
GROUP BY CustomerID;
6. ETL & BI Transformations
6.1 Pivot
-- Monthly revenue per customer (SQL Server)
SELECT CustomerID, [Jan], [Feb], [Mar]
FROM (
SELECT CustomerID, MONTH(TransactionDate) AS Month, Revenue
FROM Transactions
) AS SourceTable
PIVOT(
SUM(Revenue) FOR Month IN ([1],[2],[3])
) AS PivotTable;
6.2 Union
SELECT * FROM Customers_Region1
UNION ALL
SELECT * FROM Customers_Region2;
6.3 Incremental Aggregation
-- Weekly revenue per customer
SELECT CustomerID, SUM(TransactionAmount) AS WeeklyRevenue
FROM Transactions
WHERE TransactionDate >= DATEADD(DAY, -7, GETDATE())
GROUP BY CustomerID;
7. Performance Optimization
1. Indexes:
o Index CustomerID, TransactionDate for faster joins and filtering.
2. Query optimization:
o Push aggregations to source, avoid nested subqueries when
possible.
3. Partitioning:
o Split Transactions by month/region for large datasets.
4. Materialized Views:
o Precompute heavy aggregations for dashboards.
8. Telecom / BI Scenarios
Scenario 1: Top 5 customers by monthly M-Pesa transaction volume
WITH MonthlyTransactions AS (
SELECT CustomerID, Region, SUM(TransactionAmount) AS TotalRevenue
FROM Transactions
WHERE TransactionDate >= DATEADD(MONTH, -1, GETDATE())
GROUP BY CustomerID, Region
SELECT CustomerID, Region, TotalRevenue
FROM (
SELECT *, RANK() OVER(PARTITION BY Region ORDER BY TotalRevenue
DESC) AS RankByRegion
FROM MonthlyTransactions
) AS Ranked
WHERE RankByRegion <= 5;
Scenario 2: Monthly churn rate per plan
SELECT PlanID,
COUNT(CASE WHEN Status='Churned' THEN 1 END) * 1.0 / COUNT(*) AS
ChurnRate,
MONTH(EndDate) AS Month
FROM Customers
GROUP BY PlanID, MONTH(EndDate);
Scenario 3: Average ARPU per region
SELECT Region, AVG(Revenue) AS ARPU
FROM Transactions
GROUP BY Region;
Scenario 4: Inactive customers in last 3 months
SELECT CustomerID
FROM Customers c
WHERE NOT EXISTS (
SELECT 1
FROM Transactions t
WHERE [Link] = [Link]
AND TransactionDate >= DATEADD(MONTH, -3, GETDATE())
);
Scenario 5: Peak transaction hours
SELECT DATEPART(HOUR, TransactionDate) AS Hour, COUNT(*) AS
TransactionCount
FROM Transactions
GROUP BY DATEPART(HOUR, TransactionDate)
ORDER BY TransactionCount DESC;
9. Best Practices
Readable queries: Use aliases, indentation
Document logic: KPIs, calculations, transformations
Performance first: Aggregations, indexes, partitions
Accuracy & validation: Always cross-check with source data
Reusability: Use CTEs, views, templates for recurring dashboards
✅ This lecture note covers:
SQL basics → advanced analytics → BI transformations → optimization
→ telecom/BI scenarios
Ready-to-run queries tailored for BI dashboards
Performance and governance considerations
If you want, I can also create a “SQL Interview Q&A Sheet” with all
scenario questions answered in full SQL code, ready for Safaricom BI
interviews.
Do you want me to do that next?
continue
Perfect! Let’s create a comprehensive SQL Interview Q&A Sheet for a
Specialist – Business Intelligence Development & Operations role,
tailored for Safaricom or similar telecom/BI environments. This will include
all scenario questions with full SQL solutions, explanations, and
best practices.
SQL Interview Q&A Sheet – Specialist BI (Safaricom)
Q1: Top 5 Customers by Monthly M-Pesa Transaction Volume per
Region
Question: Retrieve the top 5 customers by transaction volume for each
region in the last month.
SQL Solution:
WITH MonthlyTransactions AS (
SELECT CustomerID, Region, SUM(TransactionAmount) AS TotalRevenue
FROM Transactions
WHERE TransactionDate >= DATEADD(MONTH, -1, GETDATE())
GROUP BY CustomerID, Region
)
SELECT CustomerID, Region, TotalRevenue
FROM (
SELECT *, RANK() OVER(PARTITION BY Region ORDER BY TotalRevenue
DESC) AS RankByRegion
FROM MonthlyTransactions
) AS Ranked
WHERE RankByRegion <= 5;
Explanation:
Aggregate revenue per customer per region
Use RANK() to order customers within each region
Filter top 5 per region
Q2: Monthly Churn Rate per Plan
Question: Calculate churn rate per plan per month.
SQL Solution:
SELECT PlanID,
MONTH(EndDate) AS Month,
COUNT(CASE WHEN Status = 'Churned' THEN 1 END) * 1.0 / COUNT(*)
AS ChurnRate
FROM Customers
GROUP BY PlanID, MONTH(EndDate);
Explanation:
Count churned customers vs total customers per plan per month
Multiply by 1.0 for decimal calculation
Q3: Average Revenue Per User (ARPU) per Region
Question: Calculate ARPU per region.
SQL Solution:
SELECT Region, AVG(Revenue) AS ARPU
FROM Transactions
GROUP BY Region;
Explanation:
Simple aggregation for dashboards
Can combine with customer counts for additional insights
Q4: Customers Inactive for Last 3 Months
Question: Identify customers who have not made a transaction in the last 3
months.
SQL Solution:
SELECT CustomerID
FROM Customers c
WHERE NOT EXISTS (
SELECT 1
FROM Transactions t
WHERE [Link] = [Link]
AND TransactionDate >= DATEADD(MONTH, -3, GETDATE())
);
Explanation:
NOT EXISTS ensures only customers with no recent transactions are
selected
Useful for retention campaigns
Q5: Peak Transaction Hours
Question: Find the hour of the day with highest transaction volume.
SQL Solution:
SELECT DATEPART(HOUR, TransactionDate) AS Hour, COUNT(*) AS
TransactionCount
FROM Transactions
GROUP BY DATEPART(HOUR, TransactionDate)
ORDER BY TransactionCount DESC;
Explanation:
Group by hour using DATEPART
Order by volume to find peak times
Q6: Revenue Contribution of Top 10 Customers
Question: Find the percentage contribution of top 10 customers to total
revenue.
SQL Solution:
WITH CustomerRevenue AS (
SELECT CustomerID, SUM(Revenue) AS TotalRevenue
FROM Transactions
GROUP BY CustomerID
),
TopCustomers AS (
SELECT TOP 10 *
FROM CustomerRevenue
ORDER BY TotalRevenue DESC
SELECT SUM(TotalRevenue) * 100.0 / (SELECT SUM(Revenue) FROM
Transactions) AS ContributionPercent
FROM TopCustomers;
Explanation:
Aggregate revenue per customer
Select top 10 by revenue
Compute contribution as % of total revenue
Q7: Running Total of Revenue per Month (Window Function)
Question: Calculate cumulative revenue over months.
SQL Solution:
SELECT MONTH(TransactionDate) AS Month,
SUM(Revenue) AS MonthlyRevenue,
SUM(SUM(Revenue)) OVER (ORDER BY MONTH(TransactionDate)) AS
CumulativeRevenue
FROM Transactions
GROUP BY MONTH(TransactionDate)
ORDER BY Month;
Explanation:
SUM() OVER provides running total for dashboards
Useful for trend analysis
Q8: Customers Categorized by Revenue
Question: Categorize customers into High, Medium, Low based on total
revenue.
SQL Solution:
SELECT CustomerID, SUM(Revenue) AS TotalRevenue,
CASE
WHEN SUM(Revenue) > 1000 THEN 'High'
WHEN SUM(Revenue) BETWEEN 500 AND 1000 THEN 'Medium'
ELSE 'Low'
END AS RevenueCategory
FROM Transactions
GROUP BY CustomerID;
Explanation:
Case statements allow segmentation for targeted marketing or
reporting
Q9: Materialized View for Daily Revenue per Region
Question: Create a pre-aggregated view for dashboard performance.
SQL Solution (SQL Server Example):
CREATE VIEW DailyRevenuePerRegion
WITH SCHEMABINDING
AS
SELECT Region, CAST(TransactionDate AS DATE) AS TransactionDay,
SUM(Revenue) AS TotalRevenue
FROM [Link]
GROUP BY Region, CAST(TransactionDate AS DATE);
Explanation:
Pre-aggregates data to reduce query time on dashboards
Can be refreshed daily or weekly
Q10: Incremental Aggregation for New Transactions
Question: Aggregate only transactions from the last week.
SQL Solution:
SELECT CustomerID, SUM(TransactionAmount) AS WeeklyRevenue
FROM Transactions
WHERE TransactionDate >= DATEADD(DAY, -7, GETDATE())
GROUP BY CustomerID;
Explanation:
Avoids recalculating all historical data
Efficient for dashboards with frequent updates
Best Practices for BI SQL Interviews
1. Always explain your approach to queries
2. Focus on performance: indexing, aggregation, partitions, avoiding
heavy joins when possible
3. Use window functions and CTEs for analytical queries
4. Ensure data accuracy and cross-check with source systems
5. Include telecom/BI context: regions, plans, churn, ARPU, M-Pesa
transactions
6. Show operational thinking: incremental refresh, materialized views,
alerts
✅ This sheet now gives you:
10 key scenario questions with full SQL solutions
BI-relevant queries and telecom context
Performance and optimization guidance
If you want, I can expand this further into a 50+ SQL question &
answer bank for interview preparation, covering everything from basic
SQL to complex telecom BI scenarios, so you’ll be fully prepared for
Safaricom BI interviews.
Do you want me to do that next?
create a full “BI SQL Interview Question & Answer Sheet”
Perfect! Let’s create a comprehensive BI SQL Interview Q&A Sheet
specifically for a Specialist – Business Intelligence Development &
Operations role, tailored for telecom/large-scale BI environments like
Safaricom. This will include basic to advanced SQL questions, scenario-
based questions, ready-to-run solutions, and optimization tips.
BI SQL Interview Question & Answer Sheet
Section 1: SQL Basics
Q1: Select all columns from a table Customers.
SELECT * FROM Customers;
Q2: Select distinct regions from Customers.
SELECT DISTINCT Region FROM Customers;
Q3: Retrieve all transactions over 1000 in the last 30 days.
SELECT * FROM Transactions
WHERE TransactionAmount > 1000
AND TransactionDate >= DATEADD(DAY, -30, GETDATE());
Q4: Top 10 customers by total revenue.
SELECT CustomerID, SUM(Revenue) AS TotalRevenue
FROM Transactions
GROUP BY CustomerID
ORDER BY TotalRevenue DESC
LIMIT 10; -- SQL Server: use TOP 10
Section 2: Aggregations & Grouping
Q5: Total revenue per region.
SELECT Region, SUM(Revenue) AS TotalRevenue
FROM Transactions
GROUP BY Region;
Q6: Count of active users per plan, where count > 500.
SELECT PlanID, COUNT(*) AS ActiveUsers
FROM Customers
GROUP BY PlanID
HAVING COUNT(*) > 500;
Q7: Multiple aggregates per region.
SELECT Region,
SUM(Revenue) AS TotalRevenue,
AVG(Revenue) AS AvgRevenue,
MIN(Revenue) AS MinRevenue,
MAX(Revenue) AS MaxRevenue
FROM Transactions
GROUP BY Region;
Section 3: Joins & Relationships
Q8: Inner join between Customers and Transactions.
SELECT [Link], [Link]
FROM Customers c
INNER JOIN Transactions t
ON [Link] = [Link];
Q9: Left join to include customers without transactions.
SELECT [Link], [Link]
FROM Customers c
LEFT JOIN Transactions t
ON [Link] = [Link];
Q10: Self-join to find referrals.
SELECT [Link] AS Referrer, [Link] AS Referred
FROM Customers a
INNER JOIN Customers b
ON [Link] = [Link];
Q11: Multi-table join to include plan info.
SELECT [Link], [Link], SUM([Link]) AS
TotalSpent
FROM Customers c
INNER JOIN Plans p ON [Link] = [Link]
INNER JOIN Transactions t ON [Link] = [Link]
GROUP BY [Link], [Link];
Section 4: Advanced SQL / BI Focus
Q12: Rank customers by revenue within each region.
SELECT CustomerID, Region, SUM(Revenue) AS TotalRevenue,
RANK() OVER(PARTITION BY Region ORDER BY SUM(Revenue) DESC) AS
RankByRegion
FROM Transactions
GROUP BY CustomerID, Region;
Q13: CTE to calculate total revenue per region > 1,000,000.
WITH RegionalRevenue AS (
SELECT Region, SUM(Revenue) AS TotalRevenue
FROM Transactions
GROUP BY Region
SELECT * FROM RegionalRevenue
WHERE TotalRevenue > 1000000;
Q14: Subquery to find customers above average revenue.
SELECT CustomerID, SUM(Revenue) AS TotalRevenue
FROM Transactions
GROUP BY CustomerID
HAVING SUM(Revenue) > (
SELECT AVG(TotalRevenue)
FROM (
SELECT SUM(Revenue) AS TotalRevenue
FROM Transactions
GROUP BY CustomerID
) AS Sub
);
Q15: Case statement to categorize customers by revenue.
SELECT CustomerID, SUM(Revenue) AS TotalRevenue,
CASE
WHEN SUM(Revenue) > 1000 THEN 'High'
WHEN SUM(Revenue) BETWEEN 500 AND 1000 THEN 'Medium'
ELSE 'Low'
END AS RevenueCategory
FROM Transactions
GROUP BY CustomerID;
Section 5: Data Transformation / ETL SQL
Q16: Pivot monthly revenue per customer (SQL Server).
SELECT CustomerID, [1] AS Jan, [2] AS Feb, [3] AS Mar
FROM (
SELECT CustomerID, MONTH(TransactionDate) AS Month, Revenue
FROM Transactions
) AS SourceTable
PIVOT(
SUM(Revenue) FOR Month IN ([1],[2],[3])
) AS PivotTable;
Q17: Combine customer tables from two regions.
SELECT * FROM Customers_Region1
UNION ALL
SELECT * FROM Customers_Region2;
Q18: Incremental weekly revenue aggregation.
SELECT CustomerID, SUM(TransactionAmount) AS WeeklyRevenue
FROM Transactions
WHERE TransactionDate >= DATEADD(DAY, -7, GETDATE())
GROUP BY CustomerID;
Section 6: Performance Optimization
Q19: Indexing recommendation
Index columns frequently used in WHERE clauses, joins, or order
by, e.g., CustomerID, TransactionDate.
Q20: Materialized View for daily revenue per region
CREATE VIEW DailyRevenuePerRegion
WITH SCHEMABINDING
AS
SELECT Region, CAST(TransactionDate AS DATE) AS TransactionDay,
SUM(Revenue) AS TotalRevenue
FROM [Link]
GROUP BY Region, CAST(TransactionDate AS DATE);
Q21: Partitioning suggestion
Partition Transactions table by month or region for large-scale BI
performance.
Section 7: Telecom / BI Scenario SQL
Q22: Top 5 customers by region last month
(See Q1)
Q23: Monthly churn rate per plan
(See Q2)
Q24: Average ARPU per region
(See Q3)
Q25: Customers inactive last 3 months
(See Q4)
Q26: Peak transaction hours
(See Q5)
Q27: Revenue contribution % of top 10 customers
(See Q6)
Q28: Running total of monthly revenue
(See Q7)
Q29: Categorize customers High/Medium/Low revenue
(See Q8)
Q30: Alert table for transactions dropping >20%
WITH DailyRevenue AS (
SELECT CAST(TransactionDate AS DATE) AS TransactionDay,
SUM(TransactionAmount) AS TotalRevenue
FROM Transactions
GROUP BY CAST(TransactionDate AS DATE)
SELECT [Link],
(([Link] - [Link]) * 100.0 / [Link]) AS
RevenueDropPercent
FROM DailyRevenue d1
INNER JOIN DailyRevenue d2
ON [Link] = DATEADD(DAY,1,[Link])
WHERE (([Link] - [Link]) * 100.0 / [Link]) < -
20;
Section 8: Best Practices for BI SQL
1. Readable Queries: Aliases, indentation, comments
2. Performance: Aggregations at source, indexing, partitions,
materialized views
3. Accuracy: Validate queries against source data
4. Reusability: Use CTEs, views, or templates for recurring reports
5. BI Context Awareness: Include metrics like churn, ARPU, transaction
volume, regional segmentation
6. Scalability: Handle millions of rows efficiently
7. Documentation: Track KPI definitions and transformations