SQL (SQLite engine)

Combine aggregates with conditions

Hard120 pts~45 min
  • Acme Commerce DB
Practice app · Acme Commerce DB

A real SQL database (SQLite engine) seeded with an e-commerce and HR dataset, with schema browser and query runner.

Test URL
/lab/databases-combine-aggregates-with-conditions

Your starter code already declares TEST_URL — never hardcode a host.

Objective

Combine aggregates with conditions. Practise it against the Acme Commerce DB practice application (A real SQL database (SQLite engine) seeded with an e-commerce and HR dataset, with schema browser and query runner.).

Your task

  1. 1Open the practice application at the test URL shown above and wait for it to finish loading.
  2. 2Inspect the page to find the elements you need — key elements include #schema-browser, #sql-editor, #run-query.
  3. 3Write and run a test that demonstrates: combine aggregates with conditions.
  4. 4Finish with at least one assertion on a user-visible outcome, not an internal detail.

Acceptance criteria

  • The test runs to completion without errors.
  • The test contains at least one passing assertion on a user-visible outcome.

SQL (SQLite engine) · Databases · Aggregation & grouping