Can't run my code - what errors are in my code?

Hi all,

I’m currently enrolled in the Career Path for Data Science and I’m kind of stuck on Chapter 5: Analyze Real Data with SQL - User Churn.

The link to the assignment: https://www.codecademy.com/paths/data-science/tracks/analyze-data-sql-analyze-real-data/modules/analyze-data-sql-user-churn/projects/calc-churn-proj
The link to the code that I wrote: https://gist.github.com/8c5daa2c794fc2496d6e118852a031ba

My question:

There’s no solution available and I would like to know what I exactly did wrong because obviously there’s something wrong, otherwise there’d be a query result set. Though I think I pretty much followed the guideline as per the previous assignment where they take you more by hand.

Thank you to whoever helps me :slight_smile:

Also - the chance that it’s a very common or easy mistake… please forgive me, I’m new to this :slight_smile:

There’s a few syntax issues like missing commas, and sometimes you when you SELECT you don’t specify FROM which table.

I think the bigger idea though is that it seems like you’re not testing the code as you write it. I personally use sublime and db browser for sqlite to set up a space where I can run the queries and it can quickly catch and show me what i’m doing (this requires making your own csv files, easy copy and paste job when you select * from the codeacademy example, you only need a couple of rows to test for functionality).

I find that even though this approach takes a little bit of effort to set up at first, it’s really painless when you get used to it and for anything complicated you’re going to want to do something similar (you can always run sqlite from your terminal if that’s what you’re into)

1 Like