Revision history for TrainingPracticeQueries
Additions:
(You can find the answer solutions for these query questions [[PracticeQueriesAnswers here]])
**You can see all the solutions for these queries [[PracticeQueriesAnswers here]]**
**You can see all the solutions for these queries [[PracticeQueriesAnswers here]]**
Additions:
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.
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.
Deletions:
8. Display all active statewide offices in the commonwealth of Pennsylvania.
9. 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.
Additions:
__One table queries:__
__Two table queries:__
7. 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.
__Two table queries:__
7. 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.
Deletions:
Additions:
7. Display all degrees that have periods (B.A., M.S., J.D., etc.) in them, also give the candidate's id number and the degree.
Deletions:
Additions:
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.
7. Display all degrees that have periods (B.A., M.S., J.D., etc.) in them, also give the candidate's id number and their first and last name.
8. Display all active statewide offices in the commonwealth of Pennsylvania.
9. 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.
6. Display all the dead people in Admin; include their candidate_id, first name, last name, and state. Order it by state.
7. Display all degrees that have periods (B.A., M.S., J.D., etc.) in them, also give the candidate's id number and their first and last name.
8. Display all active statewide offices in the commonwealth of Pennsylvania.
9. 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.
Deletions:
6. Display all degrees that have periods (B.A., M.S., J.D., etc.) in them, also give the candidate's id number and their first and last name.
7. Display all active statewide offices in the commonwealth of Pennsylvania.
8. 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.
Additions:
**Beginner:**
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 all the dead people in Admin; include their candidate_id, first name, last name, and state. Order it by state.
6. Display all degrees that have periods (B.A., M.S., J.D., etc.) in them, also give the candidate's id number and their first and last name.
7. Display all active statewide offices in the commonwealth of Pennsylvania.
8. 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.
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 all the dead people in Admin; include their candidate_id, first name, last name, and state. Order it by state.
6. Display all degrees that have periods (B.A., M.S., J.D., etc.) in them, also give the candidate's id number and their first and last name.
7. Display all active statewide offices in the commonwealth of Pennsylvania.
8. 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.
Deletions:
3. Display all the members of West Virginia's House Rules Committee.
4. Display the **number of** candidates who are in West Virginia's House Rules Committee.
5. Display all of the members of New York Senate's committees in order of committee name.
Additions:
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
**[[Practice7 Example of how to build query for question 7]]**
~- Religion
~- Professional Experience
~- Top Industries & Sectors behind campaign contributions
~- National Journal - Conservative on Social Policy Score
~- National Journal - Conservative on Economic Policy Score
**[[Practice7 Example of how to build query for question 7]]**
Deletions:
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
**[[Practice7 Example of how to build query for question 7]]**
Additions:
1. Display all of the candidates who are "Christian".
2. Display Joe Biden's Issue Positions.
3. Display all the members of West Virginia's House Rules Committee.
4. Display the **number of** candidates who are in West Virginia's House Rules Committee.
5. Display all of the members of New York Senate's committees in order of committee name.
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:
2. Display Joe Biden's Issue Positions.
3. Display all the members of West Virginia's House Rules Committee.
4. Display the **number of** candidates who are in West Virginia's House Rules Committee.
5. Display all of the members of New York Senate's committees in order of committee name.
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:
Deletions:
2. Display the **number of** candidates who are "Christian".
3. Display all of Joe Biden's Issue Positions.
4. Display all the members of West Virginia's House Rules Committee.
5. Display the **number of** candidates who are in West Virginia's House Rules Committee.
6. Display all of the members of New York Senate's committees in order of committee name.
7. From an actual research query:
Additions:
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):
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):
Deletions:
Additions:
2. Display the **number of** candidates who are "Christian".
Deletions:
Additions:
----
Fun to test your SQLLZ
http://www.w3schools.com/sql/default.asp
Fun to test your SQLLZ
http://www.w3schools.com/sql/default.asp
Additions:
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
**[[Practice7 Example of how to build query for question 7]]**
Religion
Professional Experience
Top Industries & Sectors behind campaign contributions
National Journal - Conservative on Social Policy Score
National Journal - Conservative on Economic Policy Score
**[[Practice7 Example of how to build query for question 7]]**
Deletions:
Religion
Professional Experience
Top Industries & Sectors behind campaign contributions
National Journal - Conservative on Social Policy Score
National Journal - Conservative on Economic Policy Score
**[[Practice7 Example of how to build query for question 7]]**
Additions:
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
**[[Practice7 Example of how to build query for question 7]]**
Religion
Professional Experience
Top Industries & Sectors behind campaign contributions
National Journal - Conservative on Social Policy Score
National Journal - Conservative on Economic Policy Score
**[[Practice7 Example of how to build query for question 7]]**
Deletions:
Religion
Professional Experience
Top Industries & Sectors behind campaign contributions
National Journal - Conservative on Social Policy Score
National Journal - Conservative on Economic Policy Score
**[[Practice7 Example of how to build query for question 7]]**
Additions:
**[[Practice7 Example of how to build query for question 7]]**
Deletions:
Additions:
**[[Practice7 Example of how to build query]]**
Deletions:
Additions:
**[[Example of how to build query Practice7]]**
Deletions:
Additions:
7. 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):
Deletions:
Congress and I would love to get some data from you. Specifically -
for each member of the incoming congress (when available):
Additions:
6. Display all of the members of New York Senate's committees in order of committee name.
7. 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**
7. 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**
Deletions:
Additions:
2. Display the **number of** candidates who are "Christian."
5. Display the **number of** candidates who are in West Virginia's House Rules Committee.
6. Display all of the members of New York Senate's committees in order of committee name.
5. Display the **number of** candidates who are in West Virginia's House Rules Committee.
6. Display all of the members of New York Senate's committees in order of committee name.
Deletions:
5. Display the number of candidates who are in West Virginia's House Rules Committee.
Additions:
4. Display all the members of West Virginia's House Rules Committee.
5. Display the number of candidates who are in West Virginia's House Rules Committee.
5. Display the number of candidates who are in West Virginia's House Rules Committee.
Deletions:
5. Display the number of candidates who are in West Virginia's Rules Committee.
Additions:
2. Display the number of candidates who are "Christian."
4. Display all the members of West Virginia's Rules Committee.
5. Display the number of candidates who are in West Virginia's Rules Committee.
4. Display all the members of West Virginia's Rules Committee.
5. Display the number of candidates who are in West Virginia's Rules Committee.
Deletions:
Additions:
3. Display all of Joe Biden's Issue Positions.
Additions:
2. Find the number of candidates who are "Christian."
Deletions:
Additions:
2. Find all candidates who are "Christian."