SQL Major Assignment
SQL Major Assignment
SOLUTION:-
SOLUTION:-
SOLUTION:-
Uttam Mehta
Q4. Execute a query to select Northern stations (Northern latitude > 39.7).
SOLUTION:-
Q5. Create another table, ‘STATS’, to store normalized temperature and precipitation
data;
SOLUTION:-
Q6. Populate the table STATS with some statistics for Jan and July.
SOLUTION:-
Uttam Mehta
Q7. Execute a query to display temperature stats from (from stats table for each city
from station table.
SOLUTION:-
Results query:-
Q8. Execute a query to look at the table stats ordered by month and greatest rainfall,
with column rearranged. It should also show the corresponding cities.
SOLUTION:-
Uttam Mehta
Q9. Execute a query to look at temperature for July from stats, lowest temperature first,
picking up city name and latitude.
SOLUTION:-
Results:-
Q10. Execute a query to show MAX and MIN temperatures as well as average rainfall for
each city.
SOLUTION:-
Result:-
Uttam Mehta
Q11. Execute a query to display each city’s monthly temperature in Celsius and rainfall
in centimetres.
SOLUTION:-
Q12. Update all rows of table STATS to compensate for faulty rain gauges known to read
0.01 inches low.
SOLUTION:-
Results:-
Uttam Mehta
Q13. Update Denver's July temperature reading as 74.9.
SOLUTIONS:-
New:-
Earlier:-
Uttam Mehta