Это видео недоступно.
Сожалеем об этом.

Complex SQL Interview Question | Based on joins, aggregate functions and more

Поделиться
HTML-код
  • Опубликовано: 31 июл 2024
  • Hey all, up with a tricky yet interesting sql interview question.
    Give it a try.
    Question- Number of times each student appeared for the exams.
    DDL Query:
    CREATE TABLE Examinations (
    student_id INT,
    subject_name VARCHAR(50)
    );
    -- Insert data into Examinations table
    INSERT INTO Examinations (student_id, subject_name)
    VALUES
    (1, 'Math'),
    (1, 'Physics'),
    (1, 'Programming'),
    (2, 'Programming'),
    (1, 'Physics'),
    (1, 'Math'),
    (13, 'Math'),
    (13, 'Programming'),
    (13, 'Physics'),
    (2, 'Math'),
    (1, 'Math');
    -- Create Students table
    drop table students
    CREATE TABLE Students (
    student_id INT,
    student_name VARCHAR(50)
    );
    -- Insert data into Students table
    INSERT INTO Students (student_id, student_name)
    VALUES
    (1, 'Alice'),
    (2, 'Bob'),
    (13, 'John'),
    (6, 'Alex');
    -- Create Subjects table
    CREATE TABLE Subjects (
    subject_name VARCHAR(50)
    );
    -- Insert data into Subjects table
    INSERT INTO Subjects (subject_name)
    VALUES
    ('Math'),
    ('Physics'),
    ('Programming');
    #ai #meta #interview #placement #college #dataanalytics #dataengineering #engineering #sql #sqlserver #facebook #google #amazon

Комментарии • 2