根据 Where 参数从 3 个不同的表中获取数据 - MySQL

Fetching Data from 3 different tables based on Where Parameters - MySQL

我需要 Select 代表的号码。 & name 连同模块的代码 & 名称,用于已参加模块但成绩低于 40 的代表(在 'take' table 中)

这是我正在做的 link - http://sqlfiddle.com/#!9/3e2c26

请忽略原始查询有多糟糕,现在我只是想解决它

加入 table 并选择列

SELECT d.no, d.name,m.code,m.name  FROM take t INNER JOIN delegate d ON d.no = t.no
INNER JOIN module m ON m.code = t.code WHERE grade < 40
  no | name | code | name   
---: | :--- | :--- | :------
2002 | Andy | A2   | ASP.NET
2002 | Andy | A3   | PHP    

db<>fiddle here