答案 0 :(得分:1)
就像@Gordon Linoff指出的那样,你可以使用SELECT DISTINCT。语法如下所示:
SELECT DISTINCT class_symbol, section_name, subject
FROM table
答案 1 :(得分:0)
您可以使用以下查询
SELECT DISTINCT CLASS_SUMBOL, SECTION_NAME, SUBJECT FROM TABLE_NAME;
答案 2 :(得分:0)
您可以使用以下查询
SELECT DISTINCT CLASS_SUMBOL, SECTION_NAME, SUBJECT
FROM TABLE_NAME A
WHERE NOT EXISTS (
SELECT 1 FROM TABLE_NAME B
WHERE A.CLASS_SUMBOL < B.CLASS_SUMBOL
AND A.SECTION_NAME = B.SECTION_NAME
AND A.SUBJECT = C.SUBJECT
)