Coding Exercises
Practice coding challenges for data analytics
New to Coding? Start with our Guided Lessons!
These exercises assume you already know basic Python or SQL. If you're just starting out, we have a better place for you:
Go to Learn Coding (For Beginners) →💻 Use the Code Playground to work on these exercises with instant code execution
Calculate Average Sales
Write a Python function to calculate the average of a list of sales numbers
Filter Products by Price
Filter a list of products to show only items above a certain price
Data Cleaning Challenge
Remove null values and calculate statistics from messy data
Group Sales by Category
Aggregate sales data by product category and calculate totals
SQL: Basic Queries
Write SELECT queries to retrieve employee data
SQL: Join Tables
Join employee and department tables to analyze organizational data
SQL: Window Functions
Use window functions to calculate running totals and rankings
Array Analytics
Use JavaScript array methods to analyze sales data
Time Series Analysis
Calculate monthly trends and growth rates from time series data
Customer Segmentation Logic
Categorize customers based on purchase history and demographics
💡 How to Practice Effectively
1️⃣Start with Fundamentals
Begin with beginner exercises to build confidence. Master the basics before moving to intermediate and advanced challenges.
2️⃣Try Before Looking
Attempt each exercise on your own first. Struggle is part of learning. Only check the solution after giving it a genuine try.
3️⃣Experiment and Modify
Don't just copy solutions. Experiment with different approaches, modify the code, and understand why it works.
4️⃣Practice Daily
Consistency is key. Try to solve at least one exercise per day. Regular practice builds muscle memory and problem-solving skills.