June 2017
Beginner to intermediate
576 pages
15h 22m
English
You can change to the SQL interface by coding %sql on the first line. That allows all subsequent code statements in that particular notebook cell to be interpreted as SQL only.
If you wish to return to another language in a subsequent cell, enter %r, %python, %scala, and so on as the first line of the cell. If you do not enter one of these magic directives, it will be interpreted in the syntax of the default notebook type (in this case, R).
Here is the version of the count sample_bin query that we performed earlier in R, but now purely in the SQL interface. The results are shown as a pivot table. If you wish, you can manipulate the format by selecting the raw data icon (the first one on the left, below the data), or ...