Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Codecademy export
SELECT *
FROM startups;
SELECT COUNT(name)
FROM startups;
SELECT SUM(valuation)
FROM startups;
SELECT MAX(raised)
FROM startups;
SELECT MAX(raised)
FROM startups
WHERE stage = 'Seed';
SELECT MIN(founded)
FROM startups;
SELECT AVG(valuation)
FROM startups;
SELECT category, ROUND(AVG(valuation),2) AS 'Average Valuation'
FROM startups
GROUP BY category
ORDER BY ROUND(AVG(valuation),2) DESC;
SELECT category, COUNT(*) AS 'Companies'
FROM startups
GROUP BY category;
SELECT category, COUNT(*) AS 'Companies'
FROM startups
GROUP BY category
HAVING COUNT(name) > 3;
SELECT location, AVG(employees) AS 'Size'
FROM startups
GROUP BY location;
SELECT location, AVG(employees) AS 'Size'
FROM startups
GROUP BY location
HAVING AVG(employees) > 500;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.