0
pleifer

SQL Help (for class)

Recommended Posts

HELLPP!!! I have spent 3 hours on this one friggin problem:( and tried everything i know (which is admitidly not much when it comes to sql) but this should be basic stuff.

I am coming up with some really wierd results, there is only 2 records in the reservation table, although anything I try gives me 13 to 300 records:S

am at my wits end with this problem, the question is

For all videos currently being reserved (i.e., those in the Reservation table), show the corresponding customer name (last and first) and zipcode, as well as the corresponding store address (street, city, state, zipcode) and manager.

and my imput:
SELECT movie.title, customer.lastname, customer.firstname, customer.zipcode, store.*
from customer, store, reservation, movie
where reservation.accountid

HELP PLLLEEZZZEEE:)


_________________________________________
The Angel of Duh has spoke

Share this post


Link to post
Share on other sites
try this;

SELECT movie.title, customer.lastname, customer.firstname, customer.zipcode, store.*
from customer customer,
store store,
reservation res,
movie movie,
video vid
where customer.accountid = res.accountid
and res.videoid = vid.videoid
and vid.storeid = store.storeid
and vid.movieid = movie.movieid

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

0