閱讀實體關聯圖(ERD)
你需要的資訊有時會分散在資料庫中的多個資料表裡。
stackoverflow 中最常見的 tag_type 是什麼?有哪些公司擁有該 type 的 tag?
若要產生這些公司的清單,你需要把三個資料表連接起來。
在決定要用哪些欄位來連接資料表時,可視需要參考這張[實體關聯圖](https://assets.datacamp.com/production/repositories/3567/datasets/be54d796caa17b30ad02d180eed75f067d4aa4f8/erdiagram.png)。
本練習屬於課程
SQL 中的探索式資料分析
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
-- Count the number of tags with each type
SELECT ___, ___ AS count
FROM ___
-- To get the count for each type, what do you need to do?
___ ___ ___
-- Order the results with the most common tag types listed first
___ ___ ___ ___;