BaşlayınÜcretsiz Başlayın

Joining themes to their children

Tables can be joined to themselves!

In the themes table, which is available for you to inspect in the console, you'll notice there is both an id column and a parent_id column. Keeping that in mind, you can join the themes table to itself to determine the parent-child relationships that exist for different themes.

In the videos, you saw themes joined to their own parents. In this exercise, you'll try a similar approach of joining themes to their own children, which is similar but reversed. Let's try this out to discover what children the theme "Harry Potter" has.

Bu egzersiz

Joining Data with dplyr

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Inner join themes to their own children, resulting in the suffixes "_parent" and "_child", respectively.
  • Filter this table to find the children of the "Harry Potter" theme.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

themes %>% 
  # Inner join the themes table
  ___ %>%
  # Filter for the "Harry Potter" parent name 
  ___
Kodu Düzenle ve Çalıştır