(You can find the answer solutions for these query questions here)
One table queries:
1. Display all of the candidates who are "Christian".
2. Display all the quotes in our database. Hint: quotes are collected by bios.
3. Display the tag_id for the Affordable-Care-Act tag.
4. Display the nickname, capital, motto, bird, and flower of New Hampshire.
5. Display the sig_id, address, and URL of the National Rifle Association.
6. Display all the dead people in Admin; include their candidate_id, first name, last name, and state. Order it by state.
Two table queries:
7. Display all of the candidates who went to the same university you did.
8. Display all degrees that have periods (B.A., M.S., J.D., etc.) in them, also give the candidate's id number, their first and last name, and what degree they received.
9. COUNT the candidates who are running in New Hampshire for the 2016 election.
10. Display all active statewide offices in the commonwealth of Pennsylvania (just the offices, not the people who hold those offices.)
11. Display all the speech_id's from speeches that have been tagged with the Affordable Care Act. Take it a bit further and get the query to get the COUNT of them.
Intermediate:
1. Display Joe Biden's Issue Positions.
2. Display all the members of West Virginia's House Rules Committee.
3. Display the number of candidates who are in West Virginia's House Rules Committee.
4. Display all of the members of New York Senate's committees in order of committee name.
5. Display all active members of state legislative leadership (Minority Whip, Majority Leader, Speaker, etc.) in Delaware.
6. Find all candidates who ran for IL State Senate in 2010; include whether or not they won; list those who won first.
7. From an actual research query: I'm preparing a chart for Bloomberg Businessweek on the incoming 113th Congress and I would love to get some data from you. Specifically - for each member of the incoming congress (when available):
- Religion
- Professional Experience
- Top Industries & Sectors behind campaign contributions
- National Journal - Conservative on Social Policy Score
- National Journal - Conservative on Economic Policy Score
Example of how to build query for question 7
You can see all the solutions for these queries here
Fun to test your SQLLZ
http://www.w3schools.com/sql/default.asp