IM Set2
IM Set2
IM Set2
Create a table to store information about weather observation stations with the following columns. STATION TABLE: I Number(3) CIT! varchar(25) STATE Varchar(10) LAT"N Number(4) LON#"$ number(4)
create another table %STATISTICS % to store normali&e' tem(erature an' (reci(itation 'ata I Number(3) )ONT* Varchar (15) TE)+", Number(10,2) -AIN"I Number(10,2)
-- ID field must match s me !"#"I$N table ID -- n du%licate ID and &$N"' c mbinati ns( -- tem%erature is in de)rees *ahrenheit -- rainfall is in inches( + %ulate the tables ,ith the bel , dataSTATION TABLE
LAT"N 33 40 46 32 3:
STATISTICS TABLE
I 13 13 44 44 55 55 55
Use the above tables to formulate SQL queries for the following : )L: 1( =uer< t sh , &#> and &IN tem%eratures as ,ell as avera)e rainfall f r each stati n 2( Dis%la< all the stati n ,h se N rthern latitude ? 3: 3( =uer< t select nl< ID, /I"0, and !"#"4 c lumns in descendin) rder based n 1#"@N and 1$N8@A 4( Dis%la< ID, 1#"@N and 1$N8@N f r the /I"0 ,ith startin) letter B/B( 5( Dis%la< the l cati n ,here the 1$N8@A is fr m 60 t 110( 5( *ind the t tal am unt f rainfall in the m nth f N vember( 6( *ind the #vera)e tem%erature in ;anuar<( 7( =uer< t l C at table !"#"I!"I/!, %icCin) u% l cati n inf rmati n b< D inin) ,ith table !"#"I$N n the ID c lumn :( 2%date ne r ,, /hennaiBs &arch tem%erature readin), t c rrect a data entr< err r L: 1( #dd a ne, c lumn named +IN/$D4 t the table !"#"I$N ,ith data t<%e f number and len)th 2 2( Increase the siEe f the +IN/$D4 t 5 3( Dr % the table !"#"I!"I/!