Find Active InternsEasy

Find Active Interns

EasySQLPractice library · +10 XPselect and filtersqlinternship

UptoSkills Arena is organizing an internship program. The interns table contains information about all the interns, including their name and whether they are currently active.

  • interns (intern_id INTEGER, name VARCHAR(50) NOT NULL, active BOOLEAN NOT NULL)

Return the name of all active interns. The order of names does not matter. NULL names are not possible due to the NOT NULL constraint. An empty result is possible if no interns are active.

Tables

CREATE TABLE interns (
  intern_id integer PRIMARY KEY,
  name varchar(50) NOT NULL,
  active boolean NOT NULL
);

Example data

INSERT INTO interns (intern_id, name, active) VALUES
(1, 'Alice', TRUE),
(2, 'Bob', FALSE),
(3, 'Charlie', TRUE),
(4, 'David', FALSE),
(5, 'Eve', TRUE);

Your query is also checked on hidden datasets with different data.

Hints