An example of replicated dplyr code from SQL code book