CAST(strftime('%Y', DATE(birthday)) AS INTEGER) AS birth_year
FROM members
WHERE
birth_year >= 1981
AND birth_year <= 1996
ORDER BY birth_year DESC`
millennialMembers
viewofparty=html`<select>
<option>Democrat</option>
<option>Republican</option>
<option>Independent</option>`
db.table`
SELECT
full_name,
terms.type,
terms.state,
terms.party,
terms.start,
terms.end
FROM members
LEFT JOIN terms ON terms.member = members.bioguide
GROUP BY bioguide
HAVING
date(max(terms.end)) > date("now")
and terms.type = "sen"
and terms.party = ${party}
ORDER BY state ASC`
// Note: There are more than these two genders! But in this dataset of members of US Congress, there are only "M" and "F" values in the gender field (so far!)
viewofgender=html`<select>
<option>M</option>
<option selected>F</option>`
beforeDate='1900-01-01'
// Try removing the "dry" to see the results of the query!
db.dry`SELECT * FROM members WHERE gender = ${gender} AND birthday < ${beforeDate}`
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.