Select sc.Land, sc.ScheibenID, sc.StarterlistenID, sc.DisziplinID, sc.Nachname, sc.Vorname, sc.Verein, sc.Trefferzahl, sc.StandNr, sc.Zeitstempel, sc.Trefferzahl, (SELECT CONCAT(LEFT(Ring01,LENGTH(Ring01)-1),',',SUBSTRING(Ring01,-1,1)) FROM Serien WHERE ScheibenID = sc.ScheibenID ORDER BY Stellung, Serie Limit 0,1) AS Serie1, (SELECT CONCAT(LEFT(Ring01,LENGTH(Ring01)-1),',',SUBSTRING(Ring01,-1,1)) FROM Serien WHERE ScheibenID = sc.ScheibenID ORDER BY Stellung, Serie Limit 1,1) AS Serie2, (SELECT CONCAT(LEFT(Ring01,LENGTH(Ring01)-1),',',SUBSTRING(Ring01,-1,1)) FROM Serien WHERE ScheibenID = sc.ScheibenID ORDER BY Stellung, Serie Limit 2,1) AS Serie3, (SELECT CONCAT(LEFT(Ring01,LENGTH(Ring01)-1),',',SUBSTRING(Ring01,-1,1)) FROM Serien WHERE ScheibenID = sc.ScheibenID ORDER BY Stellung, Serie Limit 3,1) AS Serie4, (SELECT CONCAT(LEFT(Ring01,LENGTH(Ring01)-1),',',SUBSTRING(Ring01,-1,1)) FROM Serien WHERE ScheibenID = sc.ScheibenID ORDER BY Stellung, Serie Limit 4,1) AS Serie5, (SELECT CONCAT(LEFT(Ring01,LENGTH(Ring01)-1),',',SUBSTRING(Ring01,-1,1)) FROM Serien WHERE ScheibenID = sc.ScheibenID ORDER BY Stellung, Serie Limit 5,1) AS Serie6, (SELECT CONCAT(LEFT(Ring01,LENGTH(Ring01)-1),',',SUBSTRING(Ring01,-1,1)) FROM Serien WHERE ScheibenID = sc.ScheibenID ORDER BY Stellung, Serie Limit 6,1) AS Serie7, (SELECT CONCAT(LEFT(Ring01,LENGTH(Ring01)-1),',',SUBSTRING(Ring01,-1,1)) FROM Serien WHERE ScheibenID = sc.ScheibenID ORDER BY Stellung, Serie Limit 7,1) AS Serie8, (SELECT CONCAT(LEFT(Ring01,LENGTH(Ring01)-1),',',SUBSTRING(Ring01,-1,1)) FROM Serien WHERE ScheibenID = sc.ScheibenID ORDER BY Stellung, Serie Limit 8,1) AS Serie9, (SELECT CONCAT(LEFT(Ring01,LENGTH(Ring01)-1),',',SUBSTRING(Ring01,-1,1)) FROM Serien WHERE ScheibenID = sc.ScheibenID ORDER BY Stellung, Serie Limit 9,1) AS Serie10, (SELECT CONCAT(LEFT(Ring01,LENGTH(Ring01)-1),',',SUBSTRING(Ring01,-1,1)) FROM Serien WHERE ScheibenID = sc.ScheibenID ORDER BY Stellung, Serie Limit 10,1) AS Serie11, (SELECT CONCAT(LEFT(Ring01,LENGTH(Ring01)-1),',',SUBSTRING(Ring01,-1,1)) FROM Serien WHERE ScheibenID = sc.ScheibenID ORDER BY Stellung, Serie Limit 11,1) AS Serie12, sc.TotalRing01 AS Total, (sc.TotalRing01/10)*30/sc.Trefferzahl AS prognose, (SELECT SUM(Ring01) FROM Treffer WHERE ScheibenID = sc.ScheibenID ) AS gesamtTreffer FROM `Scheiben` AS sc LEFT JOIN Serien AS se ON sc.ScheibenID = se.ScheibenID LEFT JOIN Treffer AS tr ON tr.ScheibenID = sc.ScheibenID WHERE sc.StarterlistenID IN (340) AND sc.DisziplinID = 10111030 AND sc.KlassenID = 76 GROUP BY se.ScheibenID ORDER BY prognose DESC, sc.TotalRing01 DESC, Serie12 DESC, Serie11 DESC, Serie10 DESC, Serie9 DESC, Serie8 DESC, Serie7 DESC, Serie6 DESC, Serie5 DESC, Serie4 DESC, Serie3 DESC, Serie2 DESC, Serie1 DESC
name
series
result
Akzeptieren

Diese Website verwendet Cookies. Durch die Nutzung dieser Webseite erklären Sie sich damit einverstanden, dass Cookies gesetzt werden.