Feedback please - Analyze FActbook SQL

Hello! new to code and hoping for candid feedback on formatting and minimizing redundancy (finding simpler approaches) to my queries.

DAG Factbook Analysis.ipynb (19.2 KB)

Click here to view the jupyter notebook file in a new tab

1 Like

Hi @chaos_six_actual,

I really liked your project and the fact that you adhered to the style guide.
I personally have done the queries pretty much the same way, but tried to use also the optional keywords like AS.

For the one case where an AND keyword was required your query looks like this:

%% sql
SELECT name
FROM facts
WHERE population > (SELECT AVG(population) FROM facts) AND area < (SELECT AVG(area) FROM facts);

My understand of indentation as per the style guide:

%% sql
SELECT name
  FROM facts
 WHERE population > (SELECT AVG(population) 
                       FROM facts)
   AND area < (SELECT AVG(area) 
                 FROM facts);

I am not too sure, if my understanding is 100% style guide conform though . Maybe another learner or a DQ-staff member has got a proper grip on this.

Thanks again for sharing your project
Best
Tim