SQLite Forum

Different results in SELECT DISTINCT
Login
Here are the two SQL statements:
SELECT DISTINCT `login` FROM student;
SELECT (SELECT DISTINCT `login`) FROM student;

When there two students have the same name, the first SQL will return one name, but the second SQL will return two same name. That means the keyword DISTINCT plays no roles in the second SQL. Is there some implement error causing this problem?

The followings are machine details:
SQLite version 3.31.1
Ubuntu 20.04