Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Open the two SQL files below in MySQL Workbench, then edit the statements in hw 6 . sql in accordance with the instructions. campaign -

Open the two SQL files below in MySQL Workbench, then edit the statements in hw6.sql in accordance with the instructions. campaign-normal.sql https://drive.google.com/file/d/1un7Iz052qLikPQ9G9nVttUMnQB-91LM3/view?usp=sharing hw6.sql -- The problems are based on the normalized CA candidate, contributor and contribution -- tables in file 'campaign-normal.sql'; -- NOTE: this is a large file. It will be faster if you use the File--> Run Script ... function -- in the workbench rather than open the file and execute it.--9. What is the average number of contributions per zip code? Use only -- the first five digits of the zip code. Round the average to an integer and -- label it "average". -- The correct answer is 96. select 9; --10. Looking at only the first five digits of the zip code, show the 20-- zip codes with the highest number of contributors (not contributions).-- Show the five-digit form of the zip code labeled as "zip" -- and the number of contributors labels as "count" -- Order by count high to low, and then zip low to high. -- The first result row should be 92067,35. select 10; --11. List the last name, zip, and number of contributors with that last name and zip. -- Use output labels "lastname", "zip" and "number". -- Only list rows where number is greater than 6.-- Use the substring_index function to extract the last name from the name column. select 11; --12. For each contributor that made more than 75 contributions, -- show the contributor name, total dollar amount contributed (use label "total"),-- and number of contributions (use label "number").-- Order by descreasing number. select 12;

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M. Kroenke, David J. Auer

7th edition

133544621, 133544626, 0-13-354462-1, 978-0133544626

Students also viewed these Databases questions

Question

What other blunt questions do you think would be appropriate?

Answered: 1 week ago