Public
Edited
Oct 19, 2023
2 forks
Insert cell
Insert cell
Insert cell
Insert cell
peopleFile = FileAttachment("People.csv").csv({typed:true})
Insert cell
Insert cell
db
SELECT HR
FROM batting
WHERE HR IN (
SELECT primes
FROM primeNumbers
)
Insert cell
db
SELECT primes
FROM primeNumbers
WHERE primes <= 73 AND primes NOT IN (
SELECT HR
FROM batting
)
Insert cell
db
SELECT sum(HR) AS careerHR
FROM batting
GROUP BY playerID
HAVING careerHR IN (
SELECT primes
FROM primeNumbers
)
Insert cell
db
SELECT primes
FROM primeNumbers
WHERE primes <= 762 AND primes NOT IN (
SELECT sum(HR) AS careerHR
FROM batting
GROUP BY playerID
)
Insert cell
db
SELECT max(nameFirst),max(nameLast),sum(HR) AS primeHR
FROM batting INNER JOIN people
ON batting.playerID = people.playerID
WHERE HR IN (
SELECT primes
FROM primeNumbers
)
GROUP BY batting.playerID
ORDER BY primeHR DESC
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