Super learner
This user is a Super Learner. To become a Super Learner, you need to reach Level 8.
Last answered:

05 Jun 2023

Posted on:

03 Jun 2023

0

Difference between the csv file and the SQL query

The attached csv file contains a column with the title "subscription_id" which isn't present in the sql query nor is it stated somewhere in the lesson. Also in the previous lesson (at the end) the following line is added at the start of the sql query SET sql_mode = ''; which again isn't explained.

1 answers ( 0 marked as helpful)
Instructor
Posted on:

05 Jun 2023

0

Hi Vasileios, 

thanks for reaching out! The subscription_id isn't strictly necessary for this query. In the next lesson, we work with the subscription tables and columns, but you can leave it out of your net revenue query. 

The following code

SET sql_mode = '';

can be used to change the SQL mode, as in the query without it, we get an error. That has to do with the fact that the SQL mode is set to a full outer group by by default, which throws the error in this case. If you don't get that error, you don't have to include it in the code. 

Let me know if you have any other questions!


Best, 

365 Eli

Submit an answer