Fan count per concert

The promoter is consolidating attendance: for each tour leg, they need to see its id and the number of fans who attended. If nobody attended a concert, still include that tour leg with zero so the gap is visible in the report. If a fan attended a concert on several tickets, count them once.

Expected output sample

This is what a correct answer looks like — its row count is its own, it doesn't have to match the schema tables.

tour_idfan_count
14
23
32

Your query result will appear here

Focus radio
Paused · SomaFM · Fluid