SQLSQL LabPostgreSQL practice
00:0016 / 45
A04CoreGROUP BY · COUNT DISTINCT

Regional customer mix

Return region, customer_count, and industry_count for each region. Sort by customer_count descending, then region.

Data available

Use this table

1 table
Table 1

customers

Organizations using the deployed platform.

  • customer_idintegerPK
  • nametext
  • industrytext
  • regiontext
  • tiertext
  • onboarded_attimestamptz
Query editor

PostgreSQL

Run query
Result stream

Output

Run your query to inspect its result.
Contextual coach

Ask about this attempt

Run or check a query first. The coach only comments on a real error or grader mismatch.

Field notes

Hints & explanation

Try to solve it cold. Two progressive hints are available.