これまで基本的なSQLやSQL JOINについて書きましたが、よく使われる複雑なクエリについて記載してなかったなと思ったのでこちらでまとめておきます。 クエリ結果から重複した値を除去したい場合にDISTINCTを使用します。 例えば、以下の従業員テーブルに ...
-- In this MySQL challenge, your query should return the names of the people who are reported to (excluding null values), -- the number of members that report to them, and the average age of those ...