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.
isn't id better to count? since it's non nullable e usually its the primary key witch makes guaranties the index?
I'm still learn, so i'm sorry if that makes no sense
The solution you have is probably correct - Use cast( --- as integer) to convert
It was kind of hard, I can't say that I'm experienced in SQL, but in this task I noted several new things for myself, I liked it
I would write here reply on your old question, just to make a note on my understanding of join statement work.
Databases are usually working with various data having certain characteristics based on which data could be filtered or sorted.
If you have two independent sets of data you have to allign certain elements from one set with certain elements from another set.
I.e. you do something like: for each element from set 1 find elements in set 2.
In your particular case your request is: For each element in table posts find 2 elements in table categories where id's are equal.
we took first post, take it category and search for it in table categories, obviouisly your limit statement does not make any sence as soon as for each element form posts table always exists only one record in categories ...
Is it going to look more like one liners in a production environment or will it be more segmented like mine?
This comment is hidden because it contains spoiler information about the solution
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
The description of the kata is correct. There are no cases in the tests where three posts of the same category are included. In such a case post id is used as a tiebreaker. That being said categories can have only one or no posts at all. When there are no posts you still need to return a row with category_id and category values.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Never used it, but this one was a good intro and I definitely had to read the docs and other resources to solve it.
+1 I am grateful to have been able to get through a solution based on various resources, but I can't say that I fully grasp the LATERAL functionality. Exciting to continue pursuing this concept!
and division of negative integers.
The tests seem to work correctly now.
Loading more items...