based on the three tables provided i need a select statement in my sql that will
ID: 3833177 • Letter: B
Question
based on the three tables provided i need a select statement in my sql that will display the useres by hours watched (descending).
create table movies (movieID int unsigned not null auto increment, name var char (30 not null, producer varchar 20 releaseDate year, length int, primary key movieID)); create table users (usrID int unsigned not null auto increment, firstName varchar (20 lastName varchar (20), email varchar(40), primary key (usrID)); create tahle watches (sessionID int unsigned not null auto increment, usrID int unsigned not null, movieID int unsigned not null, primary key (sessionID), foreign key(usrID) references users, foreign key (movie ID) references moviesExplanation / Answer
SQL QUERY:
OUTPUT TABLE FORMAT:
in descending order of hours_watched.
usrID firstName lastName hours_watchedRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.