> ## Documentation Index
> Fetch the complete documentation index at: https://offthepace.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# stg_results_qualifying

> Official classified results for the qualifying session.

<Note>Part of the [Staging](/transform/families/staging) family.</Note>

Official classified results for the qualifying session. One row per driver × session. The Q1/Q2/Q3 columns are each driver's official best lap in each segment and are populated only on the qualifying session's own results (they are always null on the race session's, which is what stg\_results reads). Those times are the anchors int\_qualifying\_segments matches back to the laps that set them.

## Lineage

```mermaid theme={null}
flowchart LR
  stg_results_qualifying --> int_qualifying_segments
  style stg_results_qualifying fill:#e40404,stroke:#e40404,color:#fff
```

## Overview

| Property          | Value                                  |
| ----------------- | -------------------------------------- |
| Layer             | `staging`                              |
| Family            | [Staging](/transform/families/staging) |
| Contract enforced | No                                     |

**7 tests** [guard](/transform/ci/overview) this model  -  6 generic, 1 singular.

## Columns

| Column                  | Type      | Nullable | Tests                                                                        | Description                                                                                                                                  |
| ----------------------- | --------- | -------- | ---------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `quali_result_id`       | `varchar` | Yes      | [`not_null`](/transform/ci/structural), [`unique`](/transform/ci/structural) | Surrogate key   \{race\_id}*Q*\{driver\_id}.                                                                                                 |
| `race_year`             | `integer` | Yes      | [`not_null`](/transform/ci/structural)                                       | Season year.                                                                                                                                 |
| `race_id`               | `varchar` | Yes      | [`not_null`](/transform/ci/structural)                                       | Numeric FastF1 event id cast to string; matches stg\_laps\_qualifying.race\_id.                                                              |
| `race_slug`             | `varchar` | Yes      |                                                                              | Human-readable event name.                                                                                                                   |
| `session_type`          | `varchar` | Yes      |                                                                              | Constant 'Q' marking the qualifying session.                                                                                                 |
| `driver_id`             | `varchar` | Yes      | [`not_null`](/transform/ci/structural)                                       | FastF1 three-letter driver code (e.g. VER, HAM).                                                                                             |
| `driver_number`         | `varchar` | Yes      |                                                                              | Car number the driver carried in this session.                                                                                               |
| `constructor_id`        | `varchar` | Yes      |                                                                              | Team name as reported by FastF1.                                                                                                             |
| `quali_position`        | `integer` | Yes      |                                                                              | Official qualifying classification (1..20). Not the race grid   penalties are applied afterwards and show up in stg\_results.grid\_position. |
| `q1_time_s`             | `double`  | Yes      |                                                                              | Official best Q1 lap in seconds; NULL if the driver set no Q1 time.                                                                          |
| `q2_time_s`             | `double`  | Yes      |                                                                              | Official best Q2 lap in seconds; NULL if eliminated in Q1.                                                                                   |
| `q3_time_s`             | `double`  | Yes      |                                                                              | Official best Q3 lap in seconds; NULL if eliminated in Q1 or Q2.                                                                             |
| `final_segment_reached` | `varchar` | Yes      | [`not_null`](/transform/ci/structural)                                       | Furthest segment the driver reached   'Q1', 'Q2', 'Q3', or 'none' when they set no time at all.                                              |
