5 kyu
Relational division: Find all movies two actors cast in together
7,667 of 7,668pmatseykanets
Loading description...
Fundamentals
Databases
SQL
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
The schema of the
film
table in the kata description is incomplete. The columns are:film_id
title
description
release_year
language_id
rental_duration
rental_rate
length
replacement_cost
rating
last_update
special_features
fulltext
I wasn't understanding why my
natural join
didn't work.Too easy for 5q imho
It took me a while and I learnt from this kata. Good one.
I love how varied the solutions are :) Most other SQL-Katas are quite superfacial compared to this one
Ok... I passed it by cheating. I'm not very proud about it. Just saying there are ways to cheat that are not prevented by the verification...
Lol, we need a fix :O
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
Yeah, initially I had ordered by id and passed anyways. I changed to alphabetically after reviewing the instructions.
This comment has been hidden.
I get the same problem: expected true to respond to
true?
or perhaps you meantbe true
orbe_truthy
should should return the expected results ✘ expected true to respond to
true?
or perhaps you meantbe true
orbe_truthy
Unfortunately this is caused by the bug in the codewar's
compare_with
test helper. All SQL katas that use this helper, including this one, are afected. Hopefully it'll be fixed soon.Should be solved now.
expected true to respond to
true?
or perhaps you meantbe true
or `be_truthyThere is an error in the spec itself, as alecek writes even here: http://stackoverflow.com/questions/24081843/expected-true-to-respond-to-true
Please chech the issue and fix the test cases. The ruby version has changed and the syntax is different.
Thanks for your feedback. This is the problem with the built-in
compare_with
helper. Hopefully it'll be fixed soon.Should be solved now.
This comment has been hidden.
I got the right ans but for the last test case I got the following message. expected true to respond to
true?
or perhaps you meantbe true
orbe_truthy
Can anyone help?Thanks for your feedback. Can you post the exact output that you get? This kata is using a built-in
compare_with
helper and checks for the correct sorting order.This comment has been hidden.
This comment has been hidden.
I'm having this issue also. Fails on "Should return the expected results", but is also showing me the expected and actual results as the same four records in the same sort order?
Time: 1317ms Passed: 4 Failed: 1 Test Results: Results: Actual Results: Expected title Antitrust Tomatoes Clones Pinocchio Oz Liaisons Siege Madre Query Tests "title" column should be included within results (1 Passed, 0 Failed) should be a String value (1 Passed, 0 Failed) Rows should have 4 rows (1 Passed, 0 Failed) should be sorted alphabetically (1 Passed, 0 Failed) should should return the expected results ✘ expected true to respond to
true?
or perhaps you meantbe true
orbe_truthy
Any idea what's going on? Cheers
This comment has been hidden.
http://stackoverflow.com/questions/24081843/expected-true-to-respond-to-true
Hopefully codewars will fix
compare_with
test helper. Right now all katas using it are affected.Should be solved now.
Do I need to be running postgres locally for this one?
/usr/local/bundle/gems/sequel-4.39.0/lib/sequel/adapters/postgres.rb:245:in
initialize': PG::ConnectionBad: could not connect to server: Connection refused (Sequel::DatabaseConnectionError) Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432? from /home/codewarrior/setup.rb:19:in
to_a' from /home/codewarrior/setup.rb:19:inexpected' from /home/codewarrior/fixture.rb:1:in
' from /home/codewarrior/spec.rb:5:in `'ah ok it was just a glitch on the server I suppose it passed second time round...
hello all, could anyone tell me when do we get below error while soling the sql KATA. Whenever I am writting below query it is giving the error."select f1.film_id from film_actor f1 inner join film_actor f2 on f1.actor_id=f2.actor_id" {"stdout":"Connecting to database...\nRunning sql commands...\n[{"actor_id":1},{"actor_id":1},{"actor_id":1},{"actor_id":1},{"actor_id":1},{"actor_id":1},{"actor_id":1},{"actor_id":1},{"actor_id":1},{"actor_id":1},{"actor_id":10},{"actor_id":10},{"actor_id":10},{"actor_id":10},{"actor_id":10}, Thanks, Abhishek
Nice! I'm really looking forward to the proliferation of SQL kata on codewars.
nice one. @authors, just for your information: I've been able to pass this kata without using the order by, maybe you want to investigate about this.
This comment has been hidden.
This is a really nice kata!
Thanks! :)
Wow! So many different ways to construct this query!
[deleted]