tararan Posted December 2, 2006 Share Posted December 2, 2006 hey guys i'm kinda stuck at this one problem. let me explain the issue. I have 3 tables 'movie', 'request', and 'video'. MOVIE table includes the title and MovieID (this is the PK), the REQUEST table includes Customer ID and the MovieID that they are requesting. And finally the Video table includes MovieID, Copynum(there are more than 1 copy for each movieID).i need to show the movie title, number of request for a certain movie title, and the total number of copies of each requested movies.this is what i have so far.select movie.title,count(request.movieID)from movie, requestwhere request.movieID = movie.movieIDgroup by title;this query gives me the title and the number of request for that movie. what i can't figure out is how to add the total number of copies for movies that have been requested. please help! Thanks Link to comment Share on other sites More sharing options...
tararan Posted December 3, 2006 Author Share Posted December 3, 2006 it's all done guys. it took me awhile cuz the result i was getting was multiplied by the number of actual copies of the videos. I just had to divide the number of request by the of copies of the videos. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now