Question: I need help with these SQL questions. 1 ) - - For each candidate, what decimal fraction of the number of positive contributions - -

I need help with these SQL questions. 1)-- For each candidate, what decimal fraction of the number of positive contributions -- came from contributions > $2500?-- The result should have a calculated labeled as "fraction" that is a subquery to calculate the sum of -- contributions over $2500 by candidate divided by the sum of all positive contributions for the candidate. -- Order by fraction in decreasing order. -- The result should include a row with Hillary Clinton with a fraction value 0.7059482)-- 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. 3)-- 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. 4)-- 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.5)-- 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. Here is the Schema db table Please give correct answers. I will give like.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!