0% found this document useful (0 votes)
2 views

SQL Major Assignment

The document outlines a SQL major assignment consisting of various tasks related to creating and manipulating weather observation data tables. It includes creating a STATION table, inserting records, executing queries for data retrieval, and creating a STATS table for temperature and precipitation data. The assignment also involves updating records and displaying statistics for different cities based on specific criteria.

Uploaded by

Nikhil Borkar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

SQL Major Assignment

The document outlines a SQL major assignment consisting of various tasks related to creating and manipulating weather observation data tables. It includes creating a STATION table, inserting records, executing queries for data retrieval, and creating a STATS table for temperature and precipitation data. The assignment also involves updating records and displaying statistics for different cities based on specific criteria.

Uploaded by

Nikhil Borkar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

SQL Major Assignment

Q1. Create a table STATION to store information about weather observations


stations

SOLUTION:-

Q2. Insert the following records into the table.

SOLUTION:-

Q3. Execute a query to look at table STATION in undefined order.

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

You might also like