How to write a SQL query in MySQL Workbench and from where I can see the resulting
Fantastic news! We've Found the answer you've been seeking!
Question:
How to write a SQL query in MySQL Workbench and from where I can see the resulting table?
Transcribed Image Text:
Write a SQL query to calculate total population, average percentage of white, black, and Asian population, average income per capita, and average median rent, by states. Sort by total population in descending order. The resulting table may look like: State California Texas New York Florida Pennsylvania Illinois Ohio total_population 37659181 25639373 19487053 19091156 12731381 12661727 11549590 Michigan 9886095 Georgia 9810417 North Carolina 9651380 1 avg_percent_white avg_percent_black avg_percent_asian avg_income avg_rent 27255.2759 932.9138 22813.8110 478.2008 27608.3710 691.6290 22904.4328 665.4478 25173.2985 551.2537 25223.0795 493.9659 23542.8068 498.6932 22830.2530 519.6867 20093.7736 480.2453 22042.2800 505.6600 56.5000 58.4724 82.3548 69.3433 89.5224 87.3636 91.0000 88.8554 63.5409 68.8000 3.1034 6.2323 5.7419 14.0896 4.2388 4.9432 4.0227 3.7711 28.0692 20.2800 6.6034 0.7953 2.5806 1.4776 1.1791 1.1250 0.7614 0.8675 1.0252 1.0000 Write a SQL query to calculate total population, average percentage of white, black, and Asian population, average income per capita, and average median rent, by states. Sort by total population in descending order. The resulting table may look like: State California Texas New York Florida Pennsylvania Illinois Ohio total_population 37659181 25639373 19487053 19091156 12731381 12661727 11549590 Michigan 9886095 Georgia 9810417 North Carolina 9651380 1 avg_percent_white avg_percent_black avg_percent_asian avg_income avg_rent 27255.2759 932.9138 22813.8110 478.2008 27608.3710 691.6290 22904.4328 665.4478 25173.2985 551.2537 25223.0795 493.9659 23542.8068 498.6932 22830.2530 519.6867 20093.7736 480.2453 22042.2800 505.6600 56.5000 58.4724 82.3548 69.3433 89.5224 87.3636 91.0000 88.8554 63.5409 68.8000 3.1034 6.2323 5.7419 14.0896 4.2388 4.9432 4.0227 3.7711 28.0692 20.2800 6.6034 0.7953 2.5806 1.4776 1.1791 1.1250 0.7614 0.8675 1.0252 1.0000
Expert Answer:
Answer rating: 100% (QA)
To write the SQL query in MySQL Workbench you can follow these steps Open MySQL Workben... View the full answer
Related Book For
Accounting Information Systems
ISBN: 978-1260153156
2nd edition
Authors: Vernon Richardson, Chengyee Chang, Rod Smith
Posted Date:
Students also viewed these databases questions
-
8. Agreement and disagreement among economists Suppose that Shen, an economist from a consulting firm, and Valerie, another economist from a graduate program in the Northeast, are both guests on a...
-
As a human resources recruiter for a streaming TV service provider, you have been asked to discuss the importance of employment laws in creating a fair and safe work environment with several hiring...
-
Problem 3: Preparing Financial Statements and Closing Entries (29 marks) The adjusted trial balance of Beanstalk Company is as follows: Cash Accounts receivable Prepaid insurance Office supplies...
-
Give the order of magnitude () for the following algorithm. Explain why your answer is correct. GET VALUES for A1, A2, ..., An, and B, B2, ..., Ba Get value of n /* set i equal to 1 */ /* for each of...
-
Approximate the centroid of the lamina shown in Figure 22. All measurements are in centimeters, and the horizontal measurements occur 5 centimeters apart. 6.5 9 40 10 10.5- 10.5
-
It seems that if certain video games can have a bad influence on children or teens, they would likely have similar effects upon adults. What do you think, and why? Would you be willing to let felons...
-
At the beginning of 2016, John Cornell decided to quit his job as a construction company ey supervisor and formed his own residential housing construction company. When he resigned, he had a contract...
-
The following control procedures are used at Aldean Company for over-the-counter cash receipts. 1. To minimize the risk of robbery, cash in excess of $100 is stored in an unlocked attach case in the...
-
An employee of the army while on assignment with a contractor alleged she was raped by a group of coworkers while she was on an assignment in Iraq. The sexual assualt took place in the employee's...
-
Andrew Miller recently opened a new doughnut shop near Cornwall, England. He sells doughnuts in packets of four each. The average price of a doughnut box is $4.00 and each box costs Andrew an average...
-
please help this is an practice exam about finance 101
-
What individual rights are provided for in the body of the original Constitution (that is, not in one of the Amendments)? DO YOU AGREE OR DISGREE WITH THIS ANSWER? EXPLAIN WHY? An individual right...
-
Using the IRR or NPV method, calculate and determine if the following capital budget project is viable: Project Cost $2 million, Project Life 10 years, and Cost of Capital 15% . Your company expects...
-
Suppose Sally O'Neal's pizza restaurant raises the price of a large cheese pizza from $8 to $10. As a result, the quantity demanded of pizzas decreases from 50 to 40. Using the midpoint method, what...
-
Dudley Schmidlap is a 19-year-old college student at the University of Cincinnati. He lives in an off-campus apartment and money is tight. Schmidlap is a talented artist and resourceful businessman....
-
A baseball is hit so that it travels straight upward after being struck by the bat. A fan observes that it takes 2.90 s for the ball to reach its maximum height. (a) Find the ball's initial velocity....
-
When evaluating financial statements, why do we care about the industry? Why is this part of the first steps of financial statement analysis?
-
Will the prediction interval always be wider than the estimation interval for the same value of the independent variable? Briefly explain.
-
a. Draw a UML class diagram that describes the Beach Dudes sales and collection process. b. Using Microsoft Access, implement a relational database from your UML class diagram. Identify at least...
-
Think about the roles of accountants presented in Table 2.1 from Chapter 2. Why should accountants be involved in developing and reviewing the bills of materials? TABLE 2.1: Roles of the...
-
1. Big Data is often described by the three Vs, or: a. Volume, velocity, and variability. b. Volume, veracity, and variety. c. Volume, volatility, and variability. d. Volume, velocity, and variety....
-
a. Apply the following data to evaluate the time-based model of security for the XYZ Company. Does the XYZ Company satisfy the requirements of the time-based model of security? Why? Estimated time...
-
Physical security is extremely important. List and describe the physical secu rity controls that should be used to protect the data center of a financial institution. Read the article 19 Ways to...
-
People often think that only accountants need to know accounting. Many students may not consider taking accounting because they have no interest in being an accountant. Whether students aspire to be...
Study smarter with the SolutionInn App