Commas in SQL



Is there a rule/set of logic on when to use commas in SQL?
When I was doing the New York Restaurants exercise ( on the last step (CASE exercise, step 11) I got stuck for not entering a “,” after SELECT name.
I am not clear on when we need a comma or not.

Also, in that same exercise, why do we have the review column as INTEGER on the table schema, when we actually have decimal numbers there? Wouldn’t it be REAL?

Thank you for your help!



Hey Juliana, first of all I am not quite experienced with SQL, as I have completed 25% of the syllabus.

Second of all, I tried studying the syntax and it was fine for me.
But here’s my advice.

When making a multi line statement, put a comma after the first line, and put a semicolon on the last line.

But if you’re making a single line statement, just put a semicolon at the end.

Also happy Thanksgiving :turkey: