Skip to content
SDETRole
SDETRole

Pass rate per suite on the latest main build

intermediate Aggregation Challenge 7 of 13

Build a pass-rate summary for the dashboard: for the newest build on main, what percentage of runs passed in each suite?

Requirements

  • Use the build with the highest id among builds whose branch is 'main'. Do not hard-code it.
  • Count every run in that build (reruns included), except runs with status 'skipped'.
  • Return suite and pass_rate: the percentage of counted runs that passed, rounded to one decimal place.

Expected output

suite | pass_rate auth | 66.7 cart | 75 checkout | 100 search | 100

Checks (3)

  • ○Sample data
  • ○A newer build on a feature branch
  • ○A newer build on main

Each check builds a fresh database and compares your result with the reference solution's: same number of columns in the same order (names are not checked), and the same rows in any order.

query.sqlExecutes on SQLite in your browser

Ctrl/⌘ + Enter to check query · your code is saved in this browser

Results

Use Run query to see your rows, then Check query to grade it.

Schema · QA Tracker

SQLite

Loading the database…

“null” marks columns that allow NULL. Foreign keys are not enforced, as in many real test databases.

Type to search across SDETRole.

Full-text search by Pagefind · runs in your browser Open search page →