我需要将这三个SELECT语句连接在一起;可能吗?我需要一张桌子作为结果。
/*Soutezni zapasy*/
SELECT
Jmeno,
COUNT(CASE WHEN Ucast = 'TRUE' then 1 end) as Pocet_zapasu,
SUM(CASE WHEN Branky>0 then Branky end) as branek
FROM Hraci
INNER JOIN Ucast_Zapas ON Ucast_Zapas.ID_Hrace_zapas=Hraci.IDHrace
INNER JOIN Zapas ON Zapas.ID_zapas=Ucast_Zapas.ID_zapasu_ucast
INNER JOIN Kategorie ON Kategorie.IDkategorie=Zapas.Kategorie_zapas
WHERE (Kategorie.IDkategorie = 1) AND Zapas_Datum >= '1/1/2013' AND Zapas_Datum < '9/1/2014' AND(Zapas.Druh=1)
GROUP BY Jmeno;
/*Pratelske zapasy*/
SELECT
Jmeno,
COUNT(CASE WHEN Ucast = 'TRUE' then 1 end) as Pocet_zapasu,
SUM(CASE WHEN Branky>0 then Branky end) as branek
FROM Hraci
INNER JOIN Ucast_Zapas ON Ucast_Zapas.ID_Hrace_zapas=Hraci.IDHrace
INNER JOIN Zapas ON Zapas.ID_zapas=Ucast_Zapas.ID_zapasu_ucast
INNER JOIN Kategorie ON Kategorie.IDkategorie=Zapas.Kategorie_zapas
WHERE (Kategorie.IDkategorie = 1) AND Zapas_Datum >= '1/1/2013' AND Zapas_Datum < '9/1/2014' AND(Zapas.Druh=2)
GROUP BY Jmeno;
/*turnaje*/
SELECT
Jmeno,
COUNT(CASE WHEN Ucast = 'TRUE' then 1 end) as Pocet_turnaju,
SUM(CASE WHEN Branky>0 then Branky end) as branek
FROM Hraci
INNER JOIN Ucast_Turnaj ON Ucast_Turnaj.ID_Hrace_turnaj=Hraci.IDHrace
INNER JOIN Turnaj ON Turnaj.ID_turnaj=Ucast_Turnaj.ID_turnaje_ucast
INNER JOIN Kategorie ON Kategorie.IDkategorie=Turnaj.Kategorie_Turnaj
WHERE (Kategorie.IDkategorie = 1) AND Turnaj_Datum >= '1/1/2013' AND Turnaj_Datum < '9/1/2014'
GROUP BY Jmeno;