Continuing with the spirit of using the Stack Exchange Data Explorer to learn SQL, (see: Can we become our own “Northwind” for teaching SQL / databases?), I've decided to try to write a query to answer a simple question (on meta): What % of stackoverflow users have over 10,000 rep?.
Here's what I've done:
Query#1
SELECT COUNT(*)
FROM Users
WHERE
Users.Reputation >= 10000
Result:
556
Query#2
SELECT COUNT(*)
FROM
USERS
Result:
227691
Now, how do I put them together into one query? What is this query idiom called? What do I need to write so I can get, say, a one-row three-column result like this:
556 227691 0,00244190592