Consider the following relations (tables): Donor(donorld, firstName, lastName, streetAddress, city, state, zipcode) Donates(donorld, charityId, amount, dateDonated)...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Consider the following relations (tables): Donor(donorld, firstName, lastName, streetAddress, city, state, zipcode) Donates(donorld, charityId, amount, dateDonated) Charity (charityId, charityName, streetAddress, city, state, zipcode) Create SQL statement for each of the following queries: 1.List zipcode, number of donors in this zipcode for all zipcodes with more than 10 donors. Must create a column name for number of donors in this zipcode for the listing. 2. List donorld, firstName, lastName, streetAddress, city, state, zipcode of all donors who gave over $50 in 2017. 3.List donorld, firstName, lastName, streetAddress, city, state, zipcode of all donors who gave to three or more charities. Consider the following relations (tables): Donor(donorld, firstName, lastName, streetAddress, city, state, zipcode) Donates(donorld, charityId, amount, dateDonated) Charity (charityId, charityName, streetAddress, city, state, zipcode) Create SQL statement for each of the following queries: 1.List zipcode, number of donors in this zipcode for all zipcodes with more than 10 donors. Must create a column name for number of donors in this zipcode for the listing. 2. List donorld, firstName, lastName, streetAddress, city, state, zipcode of all donors who gave over $50 in 2017. 3.List donorld, firstName, lastName, streetAddress, city, state, zipcode of all donors who gave to three or more charities.
Expert Answer:
Answer rating: 100% (QA)
1 SQL statement to list the zipcode and the number of donors in each zipcode with m... View the full answer
Related Book For
Concepts of Database Management
ISBN: 978-1285427102
8th edition
Authors: Philip J. Pratt, Mary Z. Last
Posted Date:
Students also viewed these programming questions
-
During September, Khan had sales of 148,000, which made a gross profit of 40,000. Purchases amounted to 100,000 and opening inventory was 34,000. The value of closing inventory was?
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
Your company has been consulting with LookntheMirror Cosmetics over the last couple of months. It is an independent cosmetic manufacturing company that sells cosmetics to convenient stores via sales...
-
Cooper Movie Studio Corp. makes movies and is interested in lowering its operating costs for the following year, while maintaining the high quality and appeal of its movies. Cooper's management is...
-
The conical bearing is subjected to a constant pressure distribution at its surface of contact. If the coefficient of static friction is s, determine the torque M required to overcome friction if the...
-
Calculate the Electric potential (V) due to an electron at distance 7.5 mm from any source: (Given K=8.99x10 Nm2C-2 and charge of electron is q = 1.6x10-19 C.)
-
The Honeybee dataset contains data collected from the USDA on the estimated number of honeybee colonies (in thousands) for the years 1995 through 2012. We use technology to find that a regression...
-
The diagonal of a long triangular bar is well insulated, while sides of equivalent length are maintained at uniform temperatures Ta and Tb. (a) Establish a nodal network consisting of five nodes...
-
Ramos Company has the following unit costs: Variable manufacturing overhead Direct materials Direct labor Fixed manufacturing overhead Fixed marketing and administrative $19 18 23 16 14 What cost per...
-
Martin Editing Company is a small editorial services company owned and operated by Andrew Martin. On August 31, 20Y1, the end of the current year, Martin Editing Companys accounting clerk prepared...
-
Osato Chemicals Inc. currently has $540,000 in total assets and sales of $1,720,000. Half of Osatos total assets come from net fixed assets, and the rest are current assets. The firm expects sales to...
-
The manager at a Sherwin-Williams store has decided to purchase a new \($30\),000 paint-mixing machine with hi-tech instrumentation for matching color and other components. The machine may be paid...
-
Trevor needs a new computer for college. His uncle lends him $1,000 at 5 percent interest for 3 years. a. What is the total payment after 3 years if simple interest is used? b. How much of the total...
-
Shannon purchases a bond for \($1\),142.38. The bond matures in 3 years, and she will redeem it at its face value of \($1\),200. Interest premiums are paid annually. If Shannon will earn a yield of...
-
If you borrow \($40\),000 at 9 percent annual compound interest and pay it back with 7 equal annual payments, what will be the size of each payment if the first payment occurs 1 year after borrowing...
-
Jayjeet wants to purchase a car but needs $5,000 to do so. His uncle Eswar offers to loan him the money at 8 percent compounded yearly. Uncle Shankar offers to loan him the money at 9 percent simple...
-
Discuss database impact on the workplace Discuss databasebenefits when businesses use queries, forms and reports Discuss atleast two security concerns that should be discussed with aproposed solution...
-
(a) Explain why the concentration of dissolved oxygen in freshwater is an important indicator of the quality of the water. (b) How is the solubility of oxygen in water affected by increasing...
-
What additional factors must you consider during the physical-level design of a distributed database?
-
In the following exercises, you will use the data in the TAL Distributors database shown in Figure 2-1. In each step, indicate how to use relational algebra to obtain the desired results. 1. List the...
-
What does it mean when a data warehouse is nonvolatile?
-
Ferns that eject spores generally do so in pairs, with two spores flying off in opposite directions. The structure from which the spores are launched is quite lightweight. If it takes a certain...
-
A dog can provide sufficient power to pull a sled with a 60 N force at a steady 2.0 m/s. Suppose the dog is hitched to a different sled that requires 120 N to move at a constant speed. How fast can...
-
Most of the energy you expend in cycling is dissipated by the drag force. If you double your speed, you increase the drag force by a factor of 4. This increases the power to cycle at this greater...
Study smarter with the SolutionInn App