Claudio Cicali
Welcome to the official website of Claudio Cicali. This site serves as a central hub for information and updates.
Learn moreFollow along for the latest updates and announcements. Visit the homepage for more information.
Master SQL with practical exercises in a downloadable PDF
SQL becomes easier to understand when every statement solves a recognizable problem. Instead of memorising syntax alone, learners can filter customer records, match orders with products, calculate revenue and turn raw tables into evidence for a decision. Practical exercises make that connection visible and give learners immediate feedback when a query produces the wrong result.
Claudio Cicali’s downloadable PDF turns that approach into a structured workbook. It combines short explanations with realistic datasets, guided queries and independent challenges, allowing readers to move from basic selection to multi-table analysis. The material focuses on standard SQL while highlighting where database systems may handle particular functions differently.
The exercises use familiar Australian settings, including a Melbourne neighbourhood café, a Sydney design studio and customer service records across several states. Dates follow the Australian day-month-year convention, sales figures include Australian dollars and GST, and examples use synthetic information. This local grounding makes the queries easier to relate to while keeping personal and commercial data safely separated.
Why practical exercises make SQL stick
Reading about SELECT, WHERE and JOIN can create an illusion of understanding. The real test begins when a table contains duplicate customers, missing values or several ways to interpret “active”. Running a query exposes those assumptions immediately and shows why a result differs from what the writer expected.
Each exercise in the PDF starts with a business question, such as finding repeat customers or listing unpaid invoices. Readers construct the query, run it, inspect the rows and correct any errors. That sequence develops a habit of checking intermediate results rather than waiting until the final output.
The workbook also treats mistakes as part of the learning process. A query that returns too many rows might use LIKE where equality is required, while an incorrect total may come from joining a one-to-many relationship without applying DISTINCT or the right aggregation. Comparing the output with a supplied answer makes each error easier to diagnose and remember.
Inside the downloadable SQL workbook
The PDF begins with database fundamentals, including tables, rows, columns, data types, primary keys and foreign keys. Readers then work through progressively harder exercises using supplied CSV files or scripts for creating sample tables. This structure suits readers who want to learn SQL without first navigating a complicated database administration course.
Every exercise has a clear purpose and a measurable outcome. Early tasks focus on retrieving and sorting records; intermediate tasks introduce filtering, calculated fields and table joins; later exercises cover grouped reports, subqueries and common validation checks. Model answers show one efficient approach, while extension tasks allow experienced readers to explore alternatives.
A fixed-layout PDF also works well for self-directed study. It can be opened on a laptop, read on a tablet, downloaded for offline use or printed with space for annotations. The exercises remain available when a train connection drops in the Sydney CBD or when a learner studying through a regional TAFE campus has limited internet access.
Building query skills from filtering to joins
The first practical skills concern precise retrieval. Readers practise SELECT, WHERE, comparison operators, IN, BETWEEN, LIKE and IS NULL. Sample questions involve identifying overdue invoices, finding products below a stock threshold or locating customers whose email addresses are missing. Each result can be checked against the supplied data.
Date handling is treated as a practical requirement rather than an optional technical extra. The workbook uses the dd/mm/yyyy format common in Australia and demonstrates functions for extracting months, calculating age and grouping transactions by day. It also distinguishes a date from a timestamp, which matters when reporting activity across business hours.
Joins are introduced through relationships that readers can visualise. Customers have orders, orders contain products and products belong to categories. By matching primary and foreign keys with INNER JOIN and LEFT JOIN, readers learn why some records disappear and why unmatched rows are useful for spotting gaps. Challenges then require selecting only the necessary columns and avoiding duplicate counts.
Turning data into useful business answers
A Melbourne café dataset demonstrates how local language can shape a useful analysis. Sales are divided into breakfast, lunch and arvo periods, reflecting a common Australian expression while still serving as a clear field in the table. Queries compare customer spending across periods, popular menu items and revenue by weekday.
Another exercise uses a Sydney design studio that invoices clients in Australian dollars. Readers calculate total billings, separate amounts attributable to 10% GST and compare completed projects with outstanding work. These examples introduce business definitions that matter beyond syntax, including gross revenue, net revenue, invoice value and outstanding balance.
The reporting section teaches GROUP BY, HAVING, COUNT, SUM, AVG, MIN and MAX. Readers move from totals by product category to conditional groups, such as services generating more than a specified monthly amount. Window functions and subqueries then support comparisons against averages, running totals and previous periods.
Temporal questions receive attention because Australian conditions vary across the country. Melbourne and Sydney observe daylight saving, while Brisbane uses standard time throughout the year. Exercises encourage readers to store or interpret timestamps consistently and prevent daily or hourly reports from shifting unexpectedly.
A study routine that fits Australian learners
A useful session begins by reading the business question and writing down the expected shape of the answer. The learner then identifies the relevant table, selects the required columns, adds a filter and runs the query in small stages. This reduces the temptation to build one long statement that becomes difficult to troubleshoot.
Answers should be checked before the query is optimised. Counting rows, scanning for NULL values and comparing totals with the sample description can reveal an incorrect join or an unexpected duplicate. The PDF’s exercises are designed to make these checks routine, much like the validation process used in reporting work.
The workbook can support structured study at a TAFE, in a university course or alongside professional development undertaken through an employer. A learner might complete one focused exercise during a commute, then revisit errors during a longer weekend session. Synthetic records and a reminder of the Australian Privacy Act also reinforce the need to avoid entering real customer information into practice databases.
Turning practice into lasting proficiency
The exercises cover syntax, but the transferable skill is disciplined problem-solving. Readers learn to translate plain English into tables, relationships and conditions, then inspect the resulting data before presenting a conclusion. That process remains valuable across reporting tools, analytics platforms and database systems.
SQL literacy supports everyday decisions in retail, finance, operations, public administration and customer service. Someone preparing a sales dashboard needs the same filtering, joining and aggregation skills developed in the workbook. More importantly, a sound grasp of the underlying data prevents confident-looking reports from spreading incorrect totals.
A strong revision cycle alternates guided tasks with independent variations. After completing a query, the learner can change the date range, include an additional status or calculate the same measure in a different way. Repeating the exercise with a new condition builds flexibility without requiring the original question to be memorised verbatim.
Open the downloadable PDF, create a working file named sql_practice.sql, and complete the first filtering exercise before changing the dataset or query.