Forum

Write a query to di...
 
Share:
Notifications
Clear all

Write a query to display all the town names which have summer temperatures more than jaipur


Posts: 17
Topic starter
(@rahul)
Active Member
Joined: 5 years ago

Write a query to display all the town names which have summer temperatures more than jaipur. the output should be sorted on the town name.

2 Replies
Posts: 17
Guest
(@Deepak Raj)
Active Member
Joined: 5 years ago

I hope the below will work. Any other solutions are welcome.

Select townname
from Resort
Inner join Town On Resort.resortID=Town.townID
AND Town.SummerTemp> (Select Town.SmmerTemp where Town.towname="JAIPUR")
Order By townname
Reply
1 Reply
Admin
(@vinodkrsetty)
Joined: 6 years ago

Eminent Member
Posts: 27

Consider the table called the town and it has two columns like town name and summer temperature then our query would be something as below. 

Alias 

  • TOWN NAME is TOWN_NAME
  • SUMMER TEMPERATURE  is SUMMER_TEMP
  • TOWN is TWN
select TOWN_NAME from TOWN TWN
where TWN.SUMMER_TEMP>(select SUMMER_TEMP from TOWN where TOWN_NAME='JAIPUR')
order by TOWN_NAME;
Reply

Leave a reply

Author Name

Author Email

Title *

 
Preview 0 Revisions Saved
Share: