Learn Labs
SQL & Querying

Self-test

Check your understanding

Self-test5 questions

—/5
  1. Why are mutations (ALTER TABLE ... UPDATE) asynchronous and expensive?

  2. In a ClickHouse JOIN, which table should be on the right, and why?

  3. What does the -State / -Merge combinator pair do, and where did the labs use it?

  4. How does a window function differ from a GROUP BY in what it returns?

  5. Design question

    Write a query that returns, per country, the hourly count and p95 latency for the last day, and say which table sort order makes it cheap.