Public
Edited
Oct 3, 2023
24 forks
Insert cell
Insert cell
Insert cell
db
SELECT playerID
FROM batting
WHERE playerID = 'ruthba01'
UNION
SELECT playerID
FROM batting
WHERE playerID = 'ruthba01'
Insert cell
db
SELECT playerID
FROM batting
WHERE yearID = 2021 AND teamID = 'PHI'
UNION
SELECT playerID
FROM batting
WHERE yearID = 2022 AND teamID = 'PHI'
Insert cell
db
SELECT playerID
FROM batting
UNION
SELECT playerID
FROM managers
Insert cell
20610 - 20469
Insert cell
Insert cell
db
SELECT playerID,teamID
FROM batting
WHERE playerID = 'ruthba01'
INTERSECT
SELECT playerID,teamID
FROM batting
WHERE teamID = 'NYA'
Insert cell
db
SELECT playerID
FROM batting
INTERSECT
SELECT playerID
FROM managers
Insert cell
db
SELECT m.playerID,nameFirst,nameLast
FROM managers m INNER JOIN people p
ON m.playerID = p.playerID
WHERE teamID = 'NYA'
INTERSECT
SELECT b.playerID,nameFirst,nameLast
FROM batting b INNER JOIN people p
ON b.playerID = p.playerID
WHERE teamID = 'NYA'
Insert cell
db
SELECT h.playerID,nameFirst,nameLast
FROM hall h INNER JOIN people p
ON h.playerID = p.playerID
WHERE inducted = 'Y'
INTERSECT
SELECT b.playerID,max(nameFirst),max(nameLast)
FROM batting b INNER JOIN people p
ON b.playerID = p.playerID
WHERE teamID = 'PHI'
GROUP BY b.playerID
HAVING count(yearID) >= 10
Insert cell
Insert cell
db
SELECT playerID
FROM managers
EXCEPT
SELECT playerID
FROM batting
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more