Open dolzi opened 1 year ago
SELECT people.nameFirst, people.nameLast, t.TOTAL_SO FROM (SELECT playerID, SUM(SO) AS TOTAL_SO FROM pitching WHERE yearID = 2019 GROUP BY playerID ORDER BY TOTAL_SO DESC LIMIT 10) as t LEFT OUTER JOIN people ON t.playerID = people.playerID;
SELECT people.nameFirst, people.nameLast, pitching.so AS TOTAL_SO FROM pitching LEFT OUTER JOIN people ON pitching.playerID = people.playerID WHERE yearID = '2019' ORDER BY TOTAL_SO DESC LIMIT 10;
SELECT
people.nameFirst, people.nameLast, SUM(SO) AS TOTAL_SO
FROM pitching
LEFT OUTER JOIN people
ON pitching.playerID = people.playerID
Where yearID = 2019
GROUP BY pitching.playerID
ORDER BY SUM(SO) DESC LIMIT 10;
SELECT people.nameFirst, people.nameLast, SUM(SO) AS TOTAL_SO
FROM pitching
LEFT OUTER JOIN people
ON pitching.playerID = people.playerID
WHERE pitching.yearID = 2019
GROUP BY people.playerID
ORDER BY TOTAL_SO DESC
LIMIT 10;
SELECT
people.nameFirst, people.nameLast, pitching.SO AS K
FROM pitching
LEFT OUTER JOIN people
ON pitching.playerID = people.playerID
WHERE yearID = 2019
ORDER BY K DESC
LIMIT 10;
select people.nameFirst, people.nameLast, sum(SO) as TOTAL_SO from pitching left outer join people on pitching.playerID = people.playerID where pitching.yearID = 2019 group by pitching.playerID order by TOTAL_SO DESC limit 10;
SELECT people.nameFirst, people.nameLast, sum(so) as TOTAL_SO from pitching left outer join people on pitching.playerID =people.playerID where yearID=2019 group by people.playerID order by TOTAL_SO DESC limit 10;
SELECT people.nameFirst, people.nameLast, pitching.so AS TOTAL_SO FROM pitching LEFT OUTER JOIN people ON pitching.playerID = people.playerID WHERE yearID = '2019' ORDER BY TOTAL_SO DESC LIMIT 10;
#10 SELECT people.nameFirst, people.nameLast, SUM(SO) AS TOTAL_SO FROM pitching LEFT OUTER JOIN people ON pitching.playerID = people.playerID WHERE yearID = 2019 GROUP BY pitching.playerID ORDER BY TOTAL_SO DESC LIMIT 10;
SELECT
people.nameFirst, people.namelast, pitching.so as TOTAL_SO
FROM pitching
left outer join people
on pitching.playerid=people.playerID
where yearid= '2019'
order by TOTAL_SO DESC
limit 10;
SELECT people.nameFirst, people.nameLast, SUM(SO) AS TOTAL_SO FROM pitching LEFT OUTER JOIN people ON pitching.playerID = people.playerID WHERE yearID = 2019 GROUP BY pitching.playerID ORDER BY TOTAL_SO DESC LIMIT 10;
SELECT people.nameFirst, people.nameLast,
SUM(SO) AS TOTAL_SO
FROM pitching
LEFT OUTER JOIN people
ON pitching.playerID = people.playerID
WHERE pitching.yearID = 2019
GROUP BY people.playerID
ORDER BY TOTAL_SO DESC
LIMIT 10;
SELECT people.nameFirst, people.nameLast,SUM(SO) AS TOTAL_SO FROM pitching LEFT OUTER JOIN people ON pitching.playerID = people.playerID WHERE yearID = '2019' GROUP BY people.playerID ORDER BY TOTAL_SO DESC LIMIT 10;
SELECT people.nameFirst, people.nameLast, SO AS TOTAL_SO FROM pitching LEFT OUTER JOIN people ON pitching.playerID = people.playerID WHERE yearID = '2019' ORDER BY SO DESC LIMIT 10;