Posts

Showing posts with the label sql

Introduction to BigQuery ML

Image
My blog is now  on Medium ! A few months ago Google announced a new Google BigQuery feature called BigQuery ML, which is currently in Beta. It consists of a set of extensions of the SQL language that allows to create machine learning models, evaluate their predictive performance and make predictions for new data directly in BigQuery. Source: https://twitter.com/sfeir/status/1039135212633042945 One of the advantages of BigQuery ML (BQML) is that one only needs to know standard SQL in order to use it (without needing to use R or Python to train models), which makes machine learning more accessible. It even handles data transformation, training/test sets split, etc. In addition, it reduces the training time of models because it works directly where the data is stored (BigQuery) and, consequently, it is not necessary to export the data to other tools. But not everything is an advantage. First of all, the implemented models are currently limited (although we will see that...

The QUERY function: using SQL in Google Sheets

My blog is now  on Medium ! If you're familiar with SQL, one of the most powerful functions that you can use in Google Sheets is QUERY . This function runs a Google Visualization API Query Language , which is a very simple SQL language, but enough for the data manipulation typically done in spreadsheets. And I say simple because it admits many typical SQL clauses (select, where, group by, etc.) but only a few aggregation and scalar functions. You can find all the supported functions in the official documentation. In summary,  you can finally forget all the annoying functions of spreadsheets and just use SQL ! The syntax of the QUERY function is:   =QUERY(data, query, [headers])  w here data is the range of cells to perform the query on, query is the query to perform and headers is an optional parameter to specify the number of header rows at the top of data. In this post, I want to show you two applications of this function: summarizing data (see examp...