0

What am I doing wrong with IN ? Please help.

select teamname , country from teams order by teamname where country IN ('spain', 'england', 'germany');

18th Feb 2022, 2:01 AM
Leeah Jones
Leeah Jones - avatar
11 ответов
+ 4
What was the task? Ensure the country names listed are *exactly* as shown in the task Description, letter case matters. 'Spain' not equal to 'spain' etc.
18th Feb 2022, 2:21 AM
Ipang
+ 2
select teamname ,country from teams where country IN ('Spain','England','Germany') ORDER BY teamname
5th May 2022, 6:48 PM
Yassine Brabije
+ 1
Also, the WHERE clause has to come before the ORDER BY clause.
18th Feb 2022, 3:20 AM
Simon Sauter
Simon Sauter - avatar
+ 1
Thank you so much!
18th Feb 2022, 11:04 AM
Leeah Jones
Leeah Jones - avatar
+ 1
Write a query to output the team names and the countries of all teams that have played in La Liga (Spain), Premier League (England) and Bundesliga (Germany)․
18th Feb 2022, 11:05 AM
Leeah Jones
Leeah Jones - avatar
+ 1
I see, I thought it was not case sensitive.
18th Feb 2022, 11:06 AM
Leeah Jones
Leeah Jones - avatar
+ 1
Leeah Jones Should not be case sensitive but don't know which database Sololearn is using.
18th Feb 2022, 1:34 PM
A͢J
A͢J - avatar
+ 1
The question of case sensitivity in SQL depends on several factors: https://learnsql.com/blog/sql-case-sensitive/
19th Feb 2022, 3:57 AM
Simon Sauter
Simon Sauter - avatar
0
team database in SQL
19th Feb 2022, 3:44 AM
Leeah Jones
Leeah Jones - avatar
0
Thank you
19th Feb 2022, 3:58 AM
Leeah Jones
Leeah Jones - avatar
- 1
Leeah Jones Just remove ORDER BY clause and you are done. Also all countries name should start from Capital letter
18th Feb 2022, 3:27 AM
A͢J
A͢J - avatar