Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
alxtech
Yak Posting Veteran
66 Posts |
Posted - 2006-03-03 : 16:52:58
|
can you please help with this, EMERGENCY!!!!!!I NEED THE SQL STATEMENTSA 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
38200 Posts |
Posted - 2006-03-03 : 17:04:22
|
See my comment in your other post.Tara Kizeraka tduggan |
|
|
alxtech
Yak Posting Veteran
66 Posts |
Posted - 2006-03-03 : 17:17:52
|
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. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-03-03 : 17:26:06
|
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 clauseb. simple update statement with a where clausec. simple select statement with a where claused. join operator and journey table together on PK and FK column, add where clausee. simple select statement with a where clause using between, wrap it in a viewTara Kizeraka tduggan |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-03-03 : 19:03:12
|
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' |
|
|
|
|
|
|
|