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:
The link to the code that I wrote:

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