我有一个快速的问题,我无法找到答案。如何加入/联合查询
(SELECT Student_Name AS 'First two from Quiz' FROM events WHERE Event_Name LIKE 'Quiz' ORDER BY Student_Name LIMIT 2)
UNION ALL
(SELECT Student_Name as 'Last two from Quiz' FROM (SELECT Student_Name FROM events WHERE Event_Name LIKE 'Quiz' ORDER BY Student_Name DESC LIMIT 2) as q ORDER BY Student_Name)
UNION ALL
(SELECT Student_Name as 'Last two from Sqlizer' FROM (SELECT Student_Name FROM events WHERE Event_Name LIKE 'Sqlizer' ORDER BY Student_Name DESC LIMIT 2) as w ORDER BY Student_Name)
UNION ALL
(SELECT Student_Name AS 'First two from Sqlizer' FROM events WHERE Event_Name LIKE 'Sqlizer' ORDER BY Student_Name LIMIT 2)
这是我的一个小代码。我需要把它们展示给另一个人。就像旁边的一个一样。由于所有工会都显示在一列中。你有解决这个问题的想法吗?请,这是时间问题。我想在2小时内完成它。
你能不能改一下你的问题吗?可能的话,预期的产量和实际可能会有所帮助 – FieryCat
这是没有必要的。问题已经被解决 –