Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This comment is hidden because it contains spoiler information about the solution
the differences between RANK, DENSE_RANK and ROW_NUMBER are how they handle dups.
Rank- Unique Rank for each row, dupes skip the next rank. Eg: 1, 2, 3, 3, 5. Rank 4 is skipped.
Dense Rank- Unique Rank for each row but Dupes aren't skipped. Eg, 1, 2, 3, 3, 4, 5. Rank 4 isn't skipped, it comes after the dupes.
ROW_NUMBER- Unique rank for each row regardless of dupes. Every row gets ranked in order, duplicates are ignored. Eg, 1, 2, 3, 4, 5, 6.
Did you change the order by statement? Got a similar error and it was resolved after i cahnged the order by to average_salary.
My kata passes when I test it but it fails on the attempt.Does anyone have any idea why?
This is the error that I get :
expected: [{:average_salary=>98677.2, :job_title=>"engineer", :total_people=>1, :total_salary=>98677.2}, {:aver...1}, {:average_salary=>10252.36, :job_title=>"economist", :total_people=>1, :total_salary=>10252.36}]
got: [{:average_salary=>82058.12, :job_title=>"lifeguard", :total_people=>4, :total_salary=>328232.49}, {:...1}, {:average_salary=>10252.36, :job_title=>"economist", :total_people=>1, :total_salary=>10252.36}]
What should be done in this task?
I used DENSE RANK function instead of RANK() and it passed. Is there a difference between them ?
Thanks :)
Hi, Amna. CONCAT_WS() is just like CONCAT() but you get to set a separator beforehand -- lemme explain. If I want to print out:
'I-like-cats' I can do it as follows:
SELECT
CONCAT_WS ('-', 'I', 'like', 'cats')
FROM users;
Will someone please explain the difference between CONCAT() and the CONCAT_WS() function?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution