Help with Problem 9 in SQL: Queries


#1


https://www.codecademy.com/en/courses/learn-sql/projects/learn_sql_query_table

9 - Return 10 movies with an IMDb rating greater than 6, are comedies, were made after 1995, and sorted by IMDb rating from highest to lowest.

(Hint: you can use AND more than once in a statement)


When I input my code, the update box will not give me my table so something is wrong...



SELECT * FROM movies
WHERE imdb_rating < '6'
AND genre = 'comedy'
AND year < 1995
ORDER BY imdb_rating DESC
LIMIT 10;


#2

made after 1995 would be > 1995

+++ show all table defintions
select * from sqlite_master;

++++ANALYZE in sqlite
http://stackoverflow.com/questions/17663379/how-to-understand-sqlite-explain-query-plan-result
http://www.sqlite.org/lang_analyze.html
http://www.sqlite.org/docs.html


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.