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.
64of 100Getting there
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.
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
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.
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.
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.
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.
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.
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.
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.
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.
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
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
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.
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
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.
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
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
Rowan HaleOutput grain
Hi, I'm Rowan Hale. I run the analytics team here at Fernhill Grocery. Thanks for making the time to talk about the Data Analyst role. This is the technical round, so we'll work through a problem together.
Rowan HaleOutput grain
What does one output row represent in this active-account report?
YouOutput grain
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.
Rowan HaleOutput grain
How will your join retain an account with no matching session?
YouOutput grain
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.
Rowan HaleQuery
Write and run the active-account query.
YouQuery
I used COUNT(DISTINCT session_id) because the export can repeat a session, so a duplicate row for session 101 is only counted once.
Rowan HaleQuery
Why would COUNT(*) give the wrong answer for an unmatched account?
YouQuery
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.
Rowan HaleEdge cases
What counts should the three active accounts have after applying the month boundaries?
YouEdge cases
I filtered October with BETWEEN October 1 and October 31, so Orchard should have one, Ridge zero and Vale zero.
Rowan HaleEdge cases
Would an inclusive upper boundary count midnight on November 1?
YouEdge cases
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.
Rowan HaleExplanation
Which independent validation would establish one output row per active account?
YouExplanation
I'd check the output looks right, three rows, one per active account, and compare it with the account list.
Rowan HaleExplanation
How would you detect an accidental extra row per account?
YouExplanation
I'd compare the number of rows with the number of active accounts and make sure they match.