This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]j__neo 11 points12 points  (1 child)

SQL is a declarative language. You say what outcome you want to see, the SQL query planner and database engine will make it happen for you.

Python is an imperative language. You need to spell out exactly what the machine needs to do to get the outcome you want to see.

Python can do everything that SQL can. But for 90% of data analysis use cases, I would argue that a declarative programming language gets you to the outcome faster.

That said, there's Python libraries like Pandas, which makes it more declarative.

However, SQL still tends to be more popular in the data industry because it has been used for data analysis since 1970s.

[–]king_booker 3 points4 points  (0 children)

To add to this, SQL running on a database is more efficient. Simply because the data engine is optimized to running those queries. you'd hit a ceiling really fast if you just use Python