I'm starting to learn python and just finished my hello world version of the Flask framework a few days ago.
Right now, I'm trying to create a simple web app that queries a database using sqlalchemy to count the total number. I'm relatively new to sqlalchemy and seem to be having trouble writing the queries.
Let's use this example table, please take a look at the screenshot below:
Normally, I would use this query in sql server to get what I want:
So I'm trying to write a function that will give me the same results.. This is what I have so far, but its giving me sql errors...
Note: I don't exactly remember what those errors are since the last time I ran them was in the school's computer center. I don't have the linux environment set up on my personal laptop yet. I will post them up when I have a chance!
So I was hoping there is someone here who is familiar enough with python2.7 to see what I'm doing wrong (e.g syntax, etc)
I hope it is okay to ask this type of question here