Workflow automation · 3 min read

Choose a Udemy SQL bootcamp by working out monthly repeat buyers

Use a small orders dataset to check whether a beginner SQL course covers joins, grouping and distinct order counts.

An order ledger with two purchases grouped for the same buyer.

A Udemy SQL bootcamp for monthly repeat-buyer reporting should cover JOIN, GROUP BY and distinct counts. Define a repeat buyer as a customer with at least two different paid orders in the same calendar month. Count orders rather than product lines.

Udemy · View product details

Write down what should count before you query

In a fictional shop, A has two paid orders on September 2 and 24. One of them has two line items. B has one August order and one September order. C has one paid order and one canceled order in September. Under this report’s definition, A is the only September repeat buyer. B has purchased before, but only one order belongs to September. C has only one paid order.

Begin with paid orders, set the report’s month and time zone, and group by the customer ID. If the query joins line items to orders, count distinct order IDs. A plain row count can turn one two-item purchase into two purchases.

Illustrative dataset: only A has two distinct paid orders in September.
Illustrative dataset: only A has two distinct paid orders in September.

Use the expected answer to read the syllabus

The linked Udemy bootcamp has separate sections on GROUP BY and JOINS. Start with a single order table. Add the customer table if you need names or segments, and only join product lines when the report needs product information. Apply a group-level condition for at least two orders and check that the output contains one September buyer.

Once that works, try another month or create a line-item duplicate. Keep A, B and C in your sample so you can explain why a result changed. That is a more useful outcome for a shop report than memorizing each SQL clause in isolation.

ProductTally may earn a commission if you buy through these links.

Udemy · See the SQL bootcamp syllabus on Udemy View product details

Official references

ProductTally may earn a commission if you buy through these links.