Country or region and language

    Choose your country or region and your language.

    Suggested for you

      All countries and regions

        Choose your character

        It shows in the top bar and on your profile. Change it any time.

        Accounts with and without activity

        SQL live interviewMid level13:32Dana Whitfield, a fictional candidate

        Dana Whitfield is a fictional candidate. This typed SQL round at mid level was scored by the same checks as a real interview, and the report talks to the candidate as "you", the way yours will.

        More practice needed

        Your practice verdict

        Your answers did not yet meet the scripted practice threshold for mid level. Focus next on time boundaries and result validation. This feedback checks stated rubric patterns and supplied work; it cannot verify every claim or predict a hiring decision.

        This report uses offline checks for the problem's concepts. These checks can miss an explanation or misunderstand it. This is practice feedback, not a hiring decision.

        How the score works

        Your rubric points earned 53 of their 75 and your four ratings 16 of their 25.

        That adds up to 69. The verdict, More practice needed, allows a score from 40 to 64, so your score is 64.

        Each rubric point counts the same: Shown earns all of its share, Partly shown 40 percent of it, Needs correcting and Not shown nothing. Each rating earns a third of its share for every step above 1, so 1 of 4 earns nothing and 4 of 4 earns all of it. The score always stays in the band its verdict allows, so the number and the verdict agree.

        Needs work0 to 39
        Getting there40 to 64
        Solid65 to 84
        Strong85 to 100

        Topic coverage

        Strong · 4 of 4

        4 of 4 rubric topics appeared in your answers. A mention alone does not establish understanding. You said: "I start from accounts and LEFT JOIN sessions on account_id, and I put the status and date conditions in the ON clause rather than the WHERE clause, because a WHERE filter on sessions would remove the unmatched accounts and lose the zero rows."

        Reasoning

        Developing · 2 of 4

        2 of 4 rubric topics included a mechanism, calculation or reason for a choice. You said: "I start from accounts and LEFT JOIN sessions on account_id, and I put the status and date conditions in the ON clause rather than the WHERE clause, because a WHERE filter on sessions would remove the unmatched accounts and lose the zero rows."

        Concrete evidence

        Developing · 2 of 4

        Your most recent executed SQL result did not match the expected rows for the supplied case. Revisit the query and the edge cases before repeating the interview.

        Communication

        Strong · 4 of 4

        You worked through all 4 interview stages. You finished within the 25-minute practice session. This measures participation and structure, not accent, speaking speed or confidence. You said: "One row per active account, so all three active accounts appear even when they have zero successful sessions. Cove is inactive, so it drops out. The export can repeat a session, so each session_id is counted once."

        How this verdict was reached

        A Promising verdict at mid level needs every line below. Each line uses only this transcript and the work you ran.

        • Rubric points explained with a reason or a worked stepYou: 2 of 4Needed: 3 or more
        • Average of the four ratingsTopic coverage 4, Reasoning 2, Concrete evidence 2, Communication 4You: 3 out of 4Needed: 2.4 or more
        • Interview stages with a substantive answer of eight words or moreYou: 4 of 4Needed: 3 or more
        • Answers that state a common mistakeYou: 0Needed: None
        • Finished within the 25-minute sessionYou: YesNeeded: Yes
        • Your last query run returned the expected rowsYou: NoNeeded: Yes

        4 of 6 lines are met. When a line is missed, the verdict is More practice needed if at least 2 rubric points are explained and 2 stages are answered, and Not enough evidence yet below that.

        How each rating is scored
        • Topic coverage counts the rubric points your answers named at all. 4 when they named all of them, 3 for at least four in five, 2 for at least two in five, otherwise 1. Naming a point is not the same as explaining it.
        • Reasoning uses the same scale for the points you explained with a reason, a mechanism or a worked figure. It is capped at 2 while an answer states a common mistake.
        • Concrete evidence counts answers with a calculation, an implementation detail or a specific action, measured against the number of stages, on the same scale. In a SQL round it is 4 when your last query run returned the expected rows and at most 2 when it did not.
        • Communication counts the interview stages where you gave a substantive answer of eight words or more, on the same scale. It is capped at 2 when the interview runs past its time. It does not judge accent, speed or confidence.

        What this round tested

        The 4 points in this round's rubric, judged at mid level. Each one quotes the answer it rests on, so you can check the call against your own words.

        2 shown2 partly shown

        1. Account-preserving join

          Shown

          What this point asks forStart with active accounts and keep session filters in the join condition.

          Your answer at

          I start from accounts and LEFT JOIN sessions on account_id, and I put the status and date conditions in the ON clause rather than the WHERE clause, because a WHERE filter on sessions would remove the unmatched accounts and lose the zero rows.

          What it showed. This answer names "left join" and ties it to a reason, a step or a worked figure. That is what this point asks for.

        2. Distinct session grain

          Shown

          What this point asks forCount distinct session identities and explain why the export can repeat one.

          Your answer at

          I used COUNT(DISTINCT session_id) because the export can repeat a session, so a duplicate row for session 101 is only counted once.

          What it showed. This answer names "distinct" and "session_id" and ties it to a reason, a step or a worked figure. That is what this point asks for.

        3. Time boundaries

          Partly shown

          What this point asks forUse an inclusive October start and an exclusive November start.

          Your answer at

          I filtered October with BETWEEN October 1 and October 31, so Orchard should have one, Ridge zero and Vale zero.

          What it showed. This answer names "October" but doesn't say how it works or why it fits here, so it counts as partly shown.

        4. Result validation

          Partly shown

          What this point asks forCheck Orchard 2, Ridge 0 and Vale 0, with exactly one row per active account.

          Your answer at

          I'd check the output looks right, three rows, one per active account, and compare it with the account list.

          What it showed. This answer names "check" but doesn't say how it works or why it fits here, so it counts as partly shown.

        What was strong

        Keep these in your next interview.

        • Account-preserving join Keep the link between your choice and its reason. Start with active accounts and keep session filters in the join condition.
        • Distinct session grain Keep the link between your choice and its reason. Count distinct session identities and explain why the export can repeat one.

        What to work on next

        The specific answers to improve at mid level, each with a better approach.

        1. Time boundaries

          Partly shown
          Your answer at

          I filtered October with BETWEEN October 1 and October 31, so Orchard should have one, Ridge zero and Vale zero.

          Why it falls short. This answer names "October" but doesn't say how it works or why it fits here, so it counts as partly shown.

          A better approach

          Use an inclusive October start and an exclusive November start.

        2. Result validation

          Partly shown
          Your answer at

          I'd check the output looks right, three rows, one per active account, and compare it with the account list.

          Why it falls short. This answer names "check" but doesn't say how it works or why it fits here, so it counts as partly shown.

          A better approach

          Check Orchard 2, Ridge 0 and Vale 0, with exactly one row per active account.

        What good looks like at mid level
        • Defend your approach and an alternative: Start with active accounts and keep session filters in the join condition.
        • Connect the mechanism to an edge case: Use an inclusive October start and an exclusive November start.
        • State evidence for your conclusion: Check Orchard 2, Ridge 0 and Vale 0, with exactly one row per active account.

        Question by question

        What you were asked, what you said, and what would have made each answer stronger.

        1. 1Output grain

          Rowan Hale askedWhat does one output row represent in this active-account report?

          You said

          One row per active account, so all three active accounts appear even when they have zero successful sessions. Cove is inactive, so it drops out. The export can repeat a session, so each session_id is counted once.

        2. 2Output grainGood answer

          Rowan Hale askedHow will your join retain an account with no matching session?

          You said

          I start from accounts and LEFT JOIN sessions on account_id, and I put the status and date conditions in the ON clause rather than the WHERE clause, because a WHERE filter on sessions would remove the unmatched accounts and lose the zero rows.

          Keep doing this

          Keep the link between your choice and its reason. Start with active accounts and keep session filters in the join condition.

          • Covered: Account-preserving join
        3. 3QueryGood answer

          Rowan Hale askedWrite and run the active-account query.

          You said

          I used COUNT(DISTINCT session_id) because the export can repeat a session, so a duplicate row for session 101 is only counted once.

          Keep doing this

          Keep the link between your choice and its reason. Count distinct session identities and explain why the export can repeat one.

          • Covered: Distinct session grain
        4. 4Query

          Rowan Hale askedWhy would COUNT(*) give the wrong answer for an unmatched account?

          You said

          COUNT(*) counts the joined row itself, so an account with no sessions would show one instead of zero. Counting the session column ignores the null.

        5. 5Edge casesRoom to improve

          Rowan Hale askedWhat counts should the three active accounts have after applying the month boundaries?

          You said

          I filtered October with BETWEEN October 1 and October 31, so Orchard should have one, Ridge zero and Vale zero.

          A stronger answer

          Use an inclusive October start and an exclusive November start.

          • Partly: Time boundaries
        6. 6Edge cases

          Rowan Hale askedWould an inclusive upper boundary count midnight on November 1?

          You said

          No, BETWEEN stops at October 31, so November 1 is already out. I think that covers October well enough, since most sessions happen during the day.

        7. 7ExplanationRoom to improve

          Rowan Hale askedWhich independent validation would establish one output row per active account?

          You said

          I'd check the output looks right, three rows, one per active account, and compare it with the account list.

          A stronger answer

          Check Orchard 2, Ridge 0 and Vale 0, with exactly one row per active account.

          • Partly: Result validation
        8. 8Explanation

          Rowan Hale askedHow would you detect an accidental extra row per account?

          You said

          I'd compare the number of rows with the number of active accounts and make sure they match.

        Your work

        Final query

        SELECT a.account_id, a.account_name, COUNT(DISTINCT s.session_id) AS successful_sessions
        FROM accounts a
        LEFT JOIN sessions s
          ON s.account_id = a.account_id
         AND s.status = 'success'
         AND s.started_at BETWEEN TIMESTAMP '2026-10-01' AND TIMESTAMP '2026-10-31'
        WHERE a.active = true
        GROUP BY a.account_id, a.account_name
        ORDER BY a.account_id;

        Interview transcript

        Practice this interviewChoose another interviewSee plans and pricing

        Interview Hub access

        The Interview Hub is included in All Access. Choose a plan or sign in to your account to continue.

        View plansSign in or join

        Your Work Gym account

        Save your progress and pick up on another device. Your browser's progress comes with you.

        or

        You can keep practicing without an account.

        Help and feedback

        Ask a question, tell us what is not working, or share an idea. We reply by email.

        What is it about?

        We use it only to reply to you.