Your task
Find each channel’s share of completed sales. Keep the denominator across channels, not within each channel. Write the query before opening the solution. Record the expected output grain.
Hint
Apply the status filter before aggregation. State whether the result represents orders, channels or periods. Keep currency units explicit.
Worked solution
Store EUR 370 = 52.86%; Web EUR 330 = 47.14%. Rounded percentages sum to 100 here; other datasets can differ by rounding.
WITH s AS (SELECT channel,SUM(net_cents) cents FROM orders WHERE status='completed' GROUP BY channel) SELECT channel,cents,ROUND(100.0*cents/(SELECT SUM(cents) FROM s),2) pct FROM s ORDER BY channel;Check your reasoning
Reconcile the result to the source and describe one limitation. This tiny fictional dataset cannot establish customer behavior or predict future sales.
Try the activity before reading its reference. Keep your sources, commands and assumptions with your work. Companion activities are unsaved self-practice and do not award a certificate or change lesson progress.