Question

In: Computer Science

I have gotten the answer?

I have gotten the answer?

Solutions

Expert Solution

Question 1

Ans - Table name - enrollments

Here you have to return the sum of hours from the table. In SQL there is a function SUM( ) that user to give you sum of particular column.

SELECT SUM (hours) FROM enrollments WHERE class='Math';

This query will return the sum of hours where class is equal to Math.

Question 2

Ans - Table name - enrollments

Here you have to select only that rows that consist class name Biology so for that

SELECT * FROM enrollments WHERE class = 'Biology'

This will return all rows containing class name ' Biology'

Question 3

Ans- Table name - enrollments

Here you have to do same thing as question 2 but you have to select school must be equal to 'Math and Science'

SELECT * FROM enrollments WHERE class = 'Biology' AND school = 'Math and Science'

It will return all that matching rows.

Question 4

Ans - Table name - weather_station and weather_stats

Here you have to join to tables

SELECT * FROM weather_station INNER JOIN weather_stats ON weather_station.id = weather_stats.id;

Here you can use JOIN or INNER JOIN both are same.

Question 5

Ans - Table name - gold_prices

Here you have to calculate average for that there is a function AVG(), you can use that

SELECT AVG(price) FROM gold_prices

GROUP BY month, year

ORDER BY year

This will return your desired result

Question 6

Ans- Table name - weather_stats and weather_station

In this table you have to use Left join or right join as well but it depends to whom you are going to accordingly

SELECT * FROM weather_stats LEFT JOIN weather_station ON weather_stats.id = weather_station.id WHERE weather_stats.month = 1 OR weather_stats.month = 4


Related Solutions

This program needs to be in C++. I have barely gotten anywhere but am already stuck....
This program needs to be in C++. I have barely gotten anywhere but am already stuck. Any help with this one would be greatly appreciated. Write a program that simulates playing a simplified version of the game "Candy Land." In "Candy Land" players take turns drawing cards that have a colored square on them. The player then travels on the board according to the color on the card. The first person to reach the end of the board wins. In...
Please do answer this...have posted it serval time and haven't gotten a respond Write a report...
Please do answer this...have posted it serval time and haven't gotten a respond Write a report about any experience you had through any internship, typed, double‐spaced, respond to the below questions and sections: 1. What activities and experiences did you have that relate to your internship goals? 2. What other important activities and experiences did you have during this report period that did not relate to your internship goals? 3. What progress did you make with your major tasks/project during...
I have been reading Hawking's 'A Brief History of Time' and it has gotten me thinking...
I have been reading Hawking's 'A Brief History of Time' and it has gotten me thinking about Einstein's theory of relativity, in that it assumes that an object must have infinite mass if it is to be traveling at the speed of light (please correct if I'm wrong in my beginner's knowledge of physics). But, do light waves have any sort of measurable mass? Or in that same vein, do sound waves? Is it somehow possible?
I have the answer to part A to D. I need the answer to the rest....
I have the answer to part A to D. I need the answer to the rest. Please help. CVP and Sensitivity Analysis (Single Product). Victoria, Inc., has annual fixed costs totaling $240,000 and variable costs of $6 per unit. Each unit of product is sold for $30. Victoria expects to sell 12,000 units this year (this is the base case). Required: Find the break-even point in units. How many units must be sold to earn an annual profit of $100,000?...
I have a problem, and I have the answer but I don't know where the solution...
I have a problem, and I have the answer but I don't know where the solution comes from. ( I have to be able to solve these myself so please help me by answering the questions about the problem.) Here is the answer given to me by the professor: What is the density of SF4 vapor at 650 torr and 100 C? 650 torr (1atm/760 Torr)=0.855atm 100C=373K PV=nRT n/v=P/RT= 0.855atm/0.8206l-atm/molek) (373)=0.0279 mole/l M.W. of SF4=108.1 gm/mole Density=mass/volume 0.0279 mole/l(108.1gm/mole) Answer...
explain your answer step by step, i already have the answer but i need the explnations...
explain your answer step by step, i already have the answer but i need the explnations and type your answer, thanks 4 FeS2   +   11 O2    ®    2 Fe2O3    +    8 SO2 1.    How many moles of oxygen are required to react with 3.75 moles of FeS2?        2.    How many moles of Fe2O3 are formed when 2.83 moles of oxygen reacts with        excess FeS2? 3.    How many moles of SO2 are formed when 2.81 moles of Fe2O3 are...
I have to answer these questions in a way that I can write out in a...
I have to answer these questions in a way that I can write out in a word document. Previous answer make little sense. I need to interpret (A) and I am just not understanding what the y intercept of -23 is indicating. I understand question b, not 100% on C please see below:   A criminologist is interested in the effects of unemployment and policing on murder and has run the following multiple regression: Summary Output Regression Statistics Multiple R 0.90303...
I have two Biophysical chem questions that I have no idea how to get the answer....
I have two Biophysical chem questions that I have no idea how to get the answer. Please help and show work. Thank you. 1. The unit millimeters of mercury (mmHg) has been replaced by the unit torr: 1mmHg is defined as the pressure at the base of a column of mercury exactly 1 mm high when its density is 13.5951 g/cm3 and the acceleration of free fall is 9.806 m/s2. What is the relation between the two units? The answer...
You have collected the following information regarding the jobs that criminal justice students have gotten after...
You have collected the following information regarding the jobs that criminal justice students have gotten after graduation. Job Males Females TOTALS Police Officer 90 20 110 Parole/Probation Officer 88 16 104 Correctional Officer 43 40 83 Graduate School 50 120 170 Employed in a non- criminal justice field 25 40 65 TOTALS 296 236 532 Write a paragraph describing the differences between males and females in this group of students. Be sure to include the following in your paragraph. A....
A high school believes that their seniors have gotten exceptionally high SAT scores this year, and...
A high school believes that their seniors have gotten exceptionally high SAT scores this year, and they want to compare the SAT scores of their 400 seniors to the SAT scores of all the high school seniors in the country.   What is the best statistical test to use to analyze the hypothesis in scenario 1? Group of answer choices One-way ANOVA Two Sample Z-Test Factor Analysis Correlation Coefficient Independent sample t-Test Dependent sample t-Test Z-Score Structural Equation Model One Sample...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT