各 ID の合計行数と、ID でグループ化された「FN%」と「W%」の成績の数の両方をカウントする SQL クエリを作成しようとしています。これらの数値が等しい場合、学生はすべて「FN%」またはすべて「W%」のいずれか、または両方の組み合わせのみを持っています。
「FN%」または「W%」の統計しかないすべての ID のリストが必要です
例 id # 683 & 657 はクエリの結果セットになりますが、603、781 & 694 はそうではありません
id stat
683 WF
683 WF
683 WF
683 WF
683 W
683 W
657 W
657 W
657 W
657 W
781 B+
781 IP
781 WP
781 WP
603 FN
603 FN
603 F
603 FN
603 FN
694 B
694 B+
694 CI
694 LAB
694 WF
694 WF
出力例:
683
657