10.2 Practice - Logical Operators (Superheroes) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 6

10.2 Practice - Logical Operators (Superheroes)

You are given the following films table with details about superhero movies: Write a query to output the names of all of the films which were produced by Marvel Studios in 2010 or later, sorted by the 'name' column. My code: SELECT name FROM films WHERE year >= '2010' AND production = 'Marvel Studios'; But it says no input. Please help.

11th Jun 2021, 6:32 AM
Chin Eu
Chin Eu - avatar
18 Answers
+ 5
Chin Eu Year is numeric value not string so remove single quotes and also result should be in Ascending ORDER of Name. SELECT name FROM films WHERE production = 'Marvel Studios' and year >= 2010 ORDER BY name
11th Jun 2021, 7:01 AM
A͢J
A͢J - avatar
+ 3
select name,year from films where production IN('Marvel Studios') and year >= 2010 order by year
25th Dec 2022, 4:01 PM
Romit Katrodiya
Romit Katrodiya - avatar
+ 2
OMG thank you so much!!!! I thought I will cry :))) been struggling with this, just because I wrote marvel studios and not Marvel Studios
16th Jul 2021, 7:34 PM
Irina Iulia Laska BA
Irina Iulia Laska BA - avatar
+ 1
select name from films where production = 'Marvel Studios' and year >= 2010 order by films.name; be careful when marvel studios M should be upper case and S should be in Upper case .. thankyou
27th Jan 2022, 9:47 AM
Jagadeesh Yadav
+ 1
SELECT name, year FROM films WHERE production IN ('Marvel Studios') AND films.year >= 2010
16th Dec 2022, 3:55 AM
Olga Lorents
Olga Lorents - avatar
0
Thanks Ajanant !
11th Jun 2021, 8:23 AM
Chin Eu
Chin Eu - avatar
0
Thank you so much. I struggled for two hours and couldn't find it, time was not wasted thanks to you.
13th Jul 2021, 10:06 AM
Dark_Mix
Dark_Mix - avatar
0
This is Correct answer for this SELECT name FROM films WHERE production = 'Marvel Studios' and year >= 2010 ORDER BY name
3rd Aug 2022, 5:10 AM
Ifthiyaz Ahamed
Ifthiyaz Ahamed - avatar
0
I keep getting the same error with this code SELECT name FROM films WHERE production = 'Marvel studios' AND year >= 2010 ORDER BY name
16th Aug 2022, 8:15 AM
Brenna Schmitz
Brenna Schmitz - avatar
0
SELECT name FROM films WHERE production = 'Marvel Studios' and year >= 2010 ORDER BY name
25th Aug 2022, 6:26 PM
Randrianantenaina José Roland
Randrianantenaina José Roland - avatar
0
great thanks
4th Nov 2022, 6:07 AM
Aiym Kurmangali
0
My solution: SELECT name FROM films WHERE production = 'Marvel Studios' and year >= 2010 ORDER BY name
10th Nov 2022, 8:19 AM
Pooja Patel
Pooja Patel - avatar
0
i keep getting the no input error as well. my code is literally the same as the one in the solution. Is this a coding error from Sololearn?
30th Dec 2022, 8:49 AM
Dimitri Dehouck
Dimitri Dehouck - avatar
0
SELECT name, year FROM films WHERE production = 'Marvel Studios' AND year >= 2010 ORDER BY name DESC
15th Jan 2023, 5:34 PM
Maciej Krawczyk
Maciej Krawczyk - avatar
0
my code was successful when I used desc instead of asc. select name , year from films where production = 'Marvel Studios' and year >= 2010 order by name desc;
12th Mar 2023, 6:47 AM
Ganta Samyutha Lakshmi
0
I think this can work: SELECT name , year FROM films WHERE year >= 2010 and production = 'Marvel Studios' Order by name desc
13th Mar 2023, 3:28 PM
Kevin Cerviño
Kevin Cerviño - avatar
0
SELECT name FROM films WHERE production='Marvel Studios' and year>=2010 ORDER BY name;
18th Nov 2023, 12:28 AM
Borico Okomo Nguema
Borico Okomo Nguema - avatar
- 2
why this code that I've written doesn't work? here is the code: select name from films where production='marvel studios' and year>=2010 order by name
12th Aug 2021, 10:19 PM
FREDERIC DANIMBE