Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started
SQL and Conceptual Fundamentals
00:00
5 left

SQL and Conceptual Fundamentals

MediumSQL · PostgreSQL

Problem

Tell me about your approach to answering medium-level SQL questions and related data concepts.

Use the supplied relational data to demonstrate that approach by summarizing medium-difficulty questions by topic. Include topics with no recorded attempts and calculate metrics only from available scores.

Output

  1. One row per medium-difficulty topic, with topic, question_count, attempted_count, average_score, and pass_rate.
  2. Include topics without attempts, using NULL for unavailable score metrics.
  3. Sort alphabetically by topic.

Schema

sql_questions
ColumnTypeDescription
question_idPKINTUnique question identifier
topicVARCHAR(100)SQL or data concept tested
difficultyVARCHAR(20)Question difficulty level
question_attempts
ColumnTypeDescription
attempt_idPKINTUnique attempt identifier
question_idINTQuestion being attempted
scoreINTAttempt score from 0 to 100
Tablessql_questionsquestion_attempts
Interviewer

Your question is SQL and Conceptual Fundamentals. Start with the requirements and the two tables in the Question tab.

Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.

You need to log in / sign up to run or submit.
CodePostgreSQL
You need to log in / sign up to run or submit.Ln 1
Run your query to see results here.