SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Old Forums
 CLOSED - General SQL Server
 Help Please
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

alxtech
Yak Posting Veteran

66 Posts

Posted - 03/03/2006 :  16:52:58  Show Profile  Visit alxtech's Homepage
can you please help with this, EMERGENCY!!!!!!
I NEED THE SQL STATEMENTS

A relational database contains details about journeys from Paisley to a variety of destinations and contains the following relations:

- Operator(op_code, op_name)
- Journey(op_code, destin_code, price)
- Destination(destin_code, destin_name, distance)

Each operator is assigned a unique code (op_code) and the relation operator records the association between this code and the operators name (op_name). Each destination has a unique code (destin_code) and the relation destination records the association between this code and the destination name (destin_name), and the distance of the destination from Paisley. The relation journey records the price of an
adult fare from Paisley to the given destination by as specified operator, several operators may operate over the same route.


Formulate the following queries using relational SQL:

Question

(a) Delete all Journeys priced under $5.

(b)Update all journeys with a price of $100 to $200.

(c) Find the names of all destinations within 20 miles.

(d) List the names of all operators with at least one journey priced at under $5.

(e) Create a view for those journeys that are priced above $1000 and and longer than 2000 miles.




tkizer
Almighty SQL Goddess

USA
37167 Posts

Posted - 03/03/2006 :  17:04:22  Show Profile  Visit tkizer's Homepage
See my comment in your other post.

Tara Kizer
aka tduggan
Go to Top of Page

alxtech
Yak Posting Veteran

66 Posts

Posted - 03/03/2006 :  17:17:52  Show Profile  Visit alxtech's Homepage
Hey bro,
i tried but nothing comes out of my mind, this is a emergency, i am taking a final but this topic is confusing. please help.
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
37167 Posts

Posted - 03/03/2006 :  17:26:06  Show Profile  Visit tkizer's Homepage
We don't answer homework questions here. But we'd be happy to help if you showed us that you at least tried.

I'll give you some hints.

a. simple select statement with a where clause
b. simple update statement with a where clause
c. simple select statement with a where clause
d. join operator and journey table together on PK and FK column, add where clause
e. simple select statement with a where clause using between, wrap it in a view

Tara Kizer
aka tduggan
Go to Top of Page

khtan
In (Som, Ni, Yak)

Singapore
17661 Posts

Posted - 03/03/2006 :  19:03:12  Show Profile
quote:
Originally posted by alxtech

Hey bro,
i tried but nothing comes out of my mind, this is a emergency, i am taking a final but this topic is confusing. please help.



Ask what you don't understand and we will be happy to answer that

----------------------------------
'KH'


Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000