Skip to content
Advertisement

Translate SQL statement in R code using dplyr

I need help transalting an SQL statement regarding this dataset https://www.kaggle.com/datasets/hugomathien/soccer , into r code using dplyr. The SQL statement is :

The r code that i have tried is:

and i get this error :

Error in dplyr::common_by(): ! by required, because the data sources have no common variables. Run rlang::last_error() to see where the error occurred.

Run rlang::last_error() to see where the error occurred.

Advertisement

Answer

Use the code:

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement