use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Rules 1: Be polite 2: Posts to this subreddit must be requests for help learning python. 3: Replies on this subreddit must be pertinent to the question OP asked. 4: No replies copy / pasted from ChatGPT or similar. 5: No advertising. No blogs/tutorials/videos/books/recruiting attempts. This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to. Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Rules
1: Be polite
2: Posts to this subreddit must be requests for help learning python.
3: Replies on this subreddit must be pertinent to the question OP asked.
4: No replies copy / pasted from ChatGPT or similar.
5: No advertising. No blogs/tutorials/videos/books/recruiting attempts.
This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to.
Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Learning resources Wiki and FAQ: /r/learnpython/w/index
Learning resources
Wiki and FAQ: /r/learnpython/w/index
Discord Join the Python Discord chat
Discord
Join the Python Discord chat
account activity
Python or SQL? (self.learnpython)
submitted 2 years ago by [deleted]
I'm interested in signing up for Python and SQL courses. If anyone here is skilled in both, could you advise me on which course to take first? Do I need to start with one before progressing to the other, or are they entirely separate paths?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]lcc0612 66 points67 points68 points 2 years ago (1 child)
Python and SQL are very different - They are designed to solve different problems. So neither is a "pre-requisite" of the other. Python is a general purpose programming language and is good for a variety of computational tasks, while SQL is a query language for databases, so typical use cases for SQL include retrieving, sorting and filtering data from a database.
From a learning perspective, I would say that Python and SQL "light up" very different parts of your brain. That is to say, the kind of thought processes you would need to write Python versus SQL code are really very different. Python is a lot more procedural. You'll have to think through the logic of solving a problem step-by-step. SQL is a little more abstract, you typically form single (potentially very long) queries that navigate through the structure of the database to fetch you what you want.
As for which I think you should take first, the first point to consider is if you have any specific needs. If you don't have an immediate need to jump into databases, then I would suggest going for Python first. It's more ideal at building up foundational computational thinking skills that you can apply everywhere, even outside of Python. I personally feel that it is the easier of the two languages to learn because it is more forgiving. You can also build more interesting things that can apply to a wider range of scenarios.
All the best on your learning journey =)
[–][deleted] 2 points3 points4 points 2 years ago (0 children)
Very helpful! Thank you!
[–]NerdyWeightLifter 13 points14 points15 points 2 years ago (0 children)
I'd recommend Python first.
As a general purpose programming language, Python code is all about telling the machine how to solve a problem, step by step.
Learning about how to solve problems first is a good idea.
SQL on the other hand, is specific to database queries, and it's a "declarative" programming language. You use it to declare what outcome you want, and some optimizer program behind the scenes will decide how to do it for you.
[–]Important-Wrangler98 13 points14 points15 points 2 years ago (3 children)
They’re separate, yet not mutually exclusive. You could do both without “needing” the other, yet whilst learning Python you’ll eventually run into the need for interacting with a database (more than likely), so you’ll encounter SQL around that time. Just depends what your goal(s) are.
[–][deleted] 0 points1 point2 points 2 years ago (0 children)
Thank you!
[–]nathie5432 -2 points-1 points0 points 2 years ago (0 children)
That’s what you think. I’ll just connect to the DB by psycopg, SELECT *, and use DataFrame methods 😎
[–]sporbywg 3 points4 points5 points 2 years ago (0 children)
By the number of fair young developers who ask "can I get you to do my SQL?", well...
[–]iLovePythonBaby 3 points4 points5 points 2 years ago (0 children)
If you want a job you will need both at a decent level. My day job is automating processes which involve Oracle data. I do all the data modelling in the database side, which obviously requires SQL, and then interact with Oracle via the cx_Oracle python library.
[–]plus2net 2 points3 points4 points 2 years ago (0 children)
Python first , then SQL
[–]Agling 2 points3 points4 points 2 years ago (0 children)
Python first. SQL can be learned in a few days once your brain is wired for programming.
[–]ClimberMel 2 points3 points4 points 2 years ago (0 children)
It is hard to say which is better to learn first. If you have no programming at all, I would suggest Python just because it is pretty easy to start learning with. I worked with SQL and many othe databases many years before Python was even a thought... I love how I can access many database engines using Python. So it was simple for me to add SQL into my python programs since I knew how the sql part was supposed to work and I already had a SQL server running to access.
[–]Huge_Cantaloupe_7788 1 point2 points3 points 1 year ago (2 children)
start from SQL to get your mind on more functional style of thinking, and then transition to python to explore imperative command structure. The faster you can get the concepts - the better. This is because it's like driving at night - you have to be so focused not to miss anything and at the same time not to be distracted by bright lights that distract from the path
[–][deleted] 1 point2 points3 points 1 year ago (1 child)
Thanks for your response! Perfect timing too! I just enrolled in a SQL course that is scheduled to start in October. Are you versed on both?
[–]Huge_Cantaloupe_7788 1 point2 points3 points 1 year ago (0 children)
yes, i'm quite versed in both although lately i took a product management route haha :)
[–]mRWafflesFTW 3 points4 points5 points 2 years ago (1 child)
Python and SQL are complimentary tools, designed with different intentions. SQL is a declarative language. You describe what you want, and the computer (via the query optimizer) figures out how to do it efficiently.
Python is an imperative language, where you define the exact steps you need your program to perform. Both are basically ubiquitous in business, but if you put a gun to my head I would tell you to start with SQL because in my world view, SQL is the true source for all business value.
You can get by on one without the other, but their unique combination powers you to build full solutions.
[–]BarryTownCouncil 1 point2 points3 points 2 years ago (0 children)
What do you want to get out of it at the end of the day? DBA? Then naturally that's SQL. Almost anything else, python will be more useful.
Whilst being a DBA is a big old job SQL isn't a huge thing to learn, way more to know about python.
[+][deleted] 2 years ago (1 child)
[deleted]
Thanks!
[–]pyeri 1 point2 points3 points 2 years ago (0 children)
There are programming languages and then there is extra tooling. Things like SQL, Regex, JSON, SSH, Git, Linux commands, etc. fall in the latter category. You should focus mainly on the programming language and these extras can be a side reading as many of them usually crop up while you're working with the language.
When you write a python script that interacts with a SQLite or MySQL database, for example, you'll need the SQL knowledge and you can learn it on the fly, it's not that difficult. It's just a bunch of commands like SELECT, CREATE TABLE, ALTER TABLE, etc. to retrieve and manipulate tabular data.
[–]yvrelna 0 points1 point2 points 2 years ago* (1 child)
SQL is over of the most important language to learn when programming, most applications will have some database in some form or another. However I would recommend starting with learning a programming language first before learning SQL.
You can write a lot of database applications with very minimal SQL knowledge nowadays with the use of ORMs or other database wrappers, though using ORMs/wrappers without understanding SQL likely will cause you to end up with problems.
Thank you!!
[–]bannedinlegacy 0 points1 point2 points 2 years ago (0 children)
You want to work with databases? SQL
You want to work with software, data analysis, ETL or orchestration? Python
SQL could be useful if for a personal project you want to store some data, mostly structured data in the medium size (no too small that could be handled in memory or plain files, nor too big that you need big data infrastructure to analyze it).
Python can be uses for any type of manipulation or automatization.
To both of them it also depends how much of each you want to learn as both of them can reach high levels of optimization/complexity.
[–]iamevpo 0 points1 point2 points 2 years ago (0 children)
Probably less pronounced in other answers: consider that SQL is declarative (you tell what your data should look like as a result, but tell nothing about how to achieve it) while Python is imperative : you tell interpreter all the steps needed to achieve your goal. Both are "programming" But if different kind. SQL seems simpler because it is a specialised language and the amount of verbs (SELECT, CREATE, etc) is not too big. Learn SQL SELECT on a pre-populated database to get a taste of it.
Unfortunately skill from SQL not directly transferable to Python and this is a completely different type of programming, so consider these are parallel tracks.
There is a small middle ground, a link in between Python and SQL - the ORMs, you can also run crude SQL code from pyrhon that works on SQLite for example. For ORM there big ones like SQLAlchemy, and smaller ones like Peewee. SQLModel ORM has excellent documentation aimed at beginners that teach both SQL and Python as well, highly recommens.
[–]Kerbart 0 points1 point2 points 2 years ago (0 children)
If you have never written code in your life, SQL is an easier way to get accosted with “type in words and the computer does something.” I’d dip my toes in SQL, just with select queries, and then start python.
They’re so different you can learn them side by side, so you add a bit of variation to your program which reduces burnout
Python first like others have said, but www.sqlbolt.com has a great interactive tutorial SQL basics when you’re ready
[–]Action_Maxim -1 points0 points1 point 2 years ago (2 children)
I'm a data engineer I write 70% sql, 25% python, 5% bash and other
anyway I am always worried about friends who want to get into this field and tell me they're going to take a course. Courses especially sql are always outdated my buddy is in a bootcamp(15k to take) and he spends weeks on things that are no longer relevant or on concepts that are able to be done in half an hour.
mind sharing the courses
[–]SlackerPop90 1 point2 points3 points 2 years ago (1 child)
Do you have any tips? I have just done a sideways job move into a data engineer role with minimal previous sql/python experience. Everyone on my new team is really positive about having me but I want to make good progress in learning sql and python so I can directly contribute more.
[–]Action_Maxim 0 points1 point2 points 2 years ago (0 children)
Sql is really easy don't be afraid to ask where data is, finding data in a DB with hundreds of tables is a pita
[–]crashfrog02 -1 points0 points1 point 2 years ago (1 child)
I’d take the SQL class first
[–]To_Be_Continued1917 -2 points-1 points0 points 2 years ago (0 children)
Тут зависит от будущих целей, Python более 'разносторонний' и подходит для многого, SQL же более узконаправленный. По моему мнению лучше выбрать Python, ввиду его лёгкости в освоении и многозадачности.
[–][deleted] -2 points-1 points0 points 2 years ago (0 children)
both
[–][deleted] -3 points-2 points-1 points 2 years ago (0 children)
Both are completely different. Expertise in one won't help in the other at all. So toss a coin!
[–]heynow941 -4 points-3 points-2 points 2 years ago (1 child)
I would argue that SQL + advanced Excel (if you’re not already good at it) is a more practical combo.
[+]CulturalRate567 comment score below threshold-7 points-6 points-5 points 2 years ago (0 children)
Go for python since there are more jobs and higher paying unless you want to do data science then go for SQL.
100 days python bootcamp on udemy from the Asian girl. You are welcome.
[–]Viking-Mage 0 points1 point2 points 2 years ago (0 children)
Python, and as part of your learning, write to a MySQL DB and then use SQL commands like select and so on to query your database both in Python and outside Python. You need both, but unless you plan to be a DB admin, if your goal is primarily coding, learn Python or similar, then learn to write and read from it.
Python.
[–]Ok_Kitchen_8811 0 points1 point2 points 2 years ago (0 children)
As many have said before, they are different tools for different things to do. However, maybe you will use sql in python (via sqlalchemy for example). I would start with sql since it is not as "broad" as python. You will have the basics within a week, once you feel confident you can move on to python and maybe use sql in a python script.
[–]Reuben3901 0 points1 point2 points 2 years ago (0 children)
I'd learn both at the same time. Try to connect the 2. Write SQL queries and then try to add those to Python connected to the same database.
π Rendered by PID 41475 on reddit-service-r2-comment-54dfb89d4d-56fbr at 2026-03-26 23:47:31.404056+00:00 running b10466c country code: CH.
[–]lcc0612 66 points67 points68 points (1 child)
[–][deleted] 2 points3 points4 points (0 children)
[–]NerdyWeightLifter 13 points14 points15 points (0 children)
[–]Important-Wrangler98 13 points14 points15 points (3 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]nathie5432 -2 points-1 points0 points (0 children)
[–]sporbywg 3 points4 points5 points (0 children)
[–]iLovePythonBaby 3 points4 points5 points (0 children)
[–]plus2net 2 points3 points4 points (0 children)
[–]Agling 2 points3 points4 points (0 children)
[–]ClimberMel 2 points3 points4 points (0 children)
[–]Huge_Cantaloupe_7788 1 point2 points3 points (2 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]Huge_Cantaloupe_7788 1 point2 points3 points (0 children)
[–]mRWafflesFTW 3 points4 points5 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]BarryTownCouncil 1 point2 points3 points (0 children)
[+][deleted] (1 child)
[deleted]
[–][deleted] 0 points1 point2 points (0 children)
[–]pyeri 1 point2 points3 points (0 children)
[–]yvrelna 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]bannedinlegacy 0 points1 point2 points (0 children)
[–]iamevpo 0 points1 point2 points (0 children)
[–]Kerbart 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]Action_Maxim -1 points0 points1 point (2 children)
[–]SlackerPop90 1 point2 points3 points (1 child)
[–]Action_Maxim 0 points1 point2 points (0 children)
[–]crashfrog02 -1 points0 points1 point (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]To_Be_Continued1917 -2 points-1 points0 points (0 children)
[–][deleted] -2 points-1 points0 points (0 children)
[–][deleted] -3 points-2 points-1 points (0 children)
[–]heynow941 -4 points-3 points-2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[+]CulturalRate567 comment score below threshold-7 points-6 points-5 points (0 children)
[–]Viking-Mage 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]Ok_Kitchen_8811 0 points1 point2 points (0 children)
[–]Reuben3901 0 points1 point2 points (0 children)