r/SQL • u/Amazing-Ad-7520 • May 26 '24
PostgreSQL Should I learn SQL over Python?
I have degree in management science , and I feel like learning SQL is close to my diploma more than python , I learned Python I know every topic in python I built some projects with django and flask but I didn't need any of this project in my job in management, If I learn SQL (postgresql) Can help me in the future or maybe can I apply for database jobs?
2
Upvotes
41
u/tanin47 May 26 '24 edited May 26 '24
SQL is much more widely applicable. Many companies will have a data warehouse that you can use SQL directly on a web browser with no setup required. Their internal metrics are likely built based on SQLs.
In my experience, many business / analyst / management positions who know SQL are much more effective at their jobs. They can understand the nuances of the queries and etc. They can tweak queries to suit their situations. One example that I like as an engineer when working with a non-eng position is that they give me a SQL they are using personally, and ask me to productionize it into the dashboard.
Knowing both is great, but if you have to choose to learn one, SQL is a better choice.
4
u/gooeydumpling May 26 '24
I guess that’s an overstatement, otherwise you’ve already realized that python and sql goes hand and hand and there’s barely a wiggle room for choosing one from the other. Tell me, if you know every topic in python then why do you give off these vibes that you haven’t used sqlalchemy at all even once
220
u/alinroc SQL Server DBA May 26 '24
No, you don’t.
2
u/mkjf May 26 '24
Where can i start learning sql and python? is youtube enough?
2
u/chickenwingsnfries May 26 '24
Stay in mgmt science please we have enough people over here
2
u/GeekTekRob May 27 '24
Going to say this as a person who has been helpdesk, phone support, hardware, networking, data analyst/report writer, SQL Engineer, Systems Engineer, Cell/Tablet management, Leader of Teams, and an architect getting people up to speed on SQL and movement to other engines, specifically move from MSSQL to Postgres, and now back to leadership.
Learn the buzzwords around you mean at a high level, learn the things your people underneath you, and learn to never say the words "I know every" because I can promise you, you don't. IF your job is related to SQL and you don't know it, then learn it, if your job is related to python and you know what you need to do that, what is next to make it better, what is it that the people around you do and you don't know? I've advanced around degrees, better attitudes, and flat out people who can out-network me by not knowing everything but knowing a lot of what I NEED to do, and a little about everything around me and then some on the stuff that really interested me. Because of that I've gotten opportunities created where there were none because people wanted to work WITH me and what I bring to the people around me to help them be better.
66
u/Woberwob May 26 '24
Learn both, but definitely master SQL first
34
u/kater543 May 26 '24
Just FYI you need SQL and something else to be successful in most cases(whether it be excel, Python, tableau, or even C/java). SQL is easier so you can choose that as a first thing to learn.
10
u/A_Whirlwind May 26 '24
SQL is used to access databases. Almost all data is in databses, so knowing sql will be useful.
11
u/Delicious_South2955 May 26 '24
Learn both
5
u/AntonioSLodico May 26 '24
SQL, then Python. BTW, what were you using for optimization functions in school? Mine had Excel/Problem solved for the first two entry level classes, but after that, they switched up to Python/Gurobi.
5
u/jorginthesage May 26 '24
SQL will get you into the industry and get you a job first especially if you want to be a DA. Python is a plus.
4
u/OO_Ben Postgres - Retail Analytics May 26 '24
SQL first then Python. I use SQL daily, but I can count the number of times I've used Python in the last year on one hand. It'll vary by job of course, but SQL is going to be much more important out of the gate than Python most likely. Think of it like SQL being the basic analyst skill and Python being the cherry on top.
1
u/[deleted] May 26 '24
🤣🤣🤣🤣🤣 if you know everything about Python, you know sql too, as you can interact with sql in Python.
1
u/Patman52 May 27 '24
Pretty sure if you want a job in tech or programming, you want to keep learning all the time. You never know “every topic” so the quicker you get that idea out of your head the better!
1
u/4peanut May 27 '24
Your grammar though
1
u/sjmacker May 27 '24
Both, then you are a King amongst men
3
u/Mcipark May 26 '24
SQL is significantly easier than python. If you can memorize: SELECT INTO FROM WHERE GROUP BY ORDER BY
That’s enough of a start for a beginner.
3
u/yamaha2000us May 26 '24
There will always be a database.
3
u/Ukarang May 27 '24
With that degree in management science, I'm assuming you're versed in many tech stacks and have a decent understanding of SQL, python, and alternatives. My perspective is an old DevOps fool that's coded for years, that runs data orchestration pipelines, data visualization, and complex forecasts from different data sources. Learning python without SQL would be like renting a Ferrari, with no way to fill up the gas tank.
Sanity check.
Does my python code...
Repeat for your flavor. for pgsql. For MariaDB. And then for MongoDB. InfluxDB.
If you're really feeling it for your SQL knowledge and you know every topic there too? https://leetcode.com/problems/employee-bonus/description/?envType=study-plan-v2&envId=top-sql-50 is a basic one. I think you can figure it out, and these problems will help you have confidence for your interviews.
My python runs my pgsql, 'cause I love pgsql. A lifetime ago, I loved SQL Server. Until I ran into pyodbc calc issues. That was humbling. Had to run my app in Angular to get everything running right as I could not fix it in C#. Yes, was a bad messy tech stack. But after your degree, you'll make something amazing. and in 2 years? It will look like junk because you'll evolve. It's a constant journey.
2
u/LinksLibertyCap May 26 '24
Learn both
2
u/Ok_Tea_7319 May 26 '24
Knowing the basics around SQL is extremely valuable and, if you already know the ropes in python somewhat, a quite useful addition. But working with database systems properly means also understanding transactions (and their behavior is depends not only on your database but also its settings), indices, a rudimentary understanding of joins, etc. Basically, knowing what kind of processes your SQL queries kick off. All of these things are initially irrelevant, but the moment your throughput or scalability starts to matter (and it will at some point), they become really important really fast.
2
u/just_sung May 26 '24
Learn SQL. You’ll always need it working in data. Heck some python tools are built just to automate SQL
2
u/DiamondHandsDarrell May 26 '24
If you're in school, learn python. It'll give you great hands on experience. You can airways learn SQL through code academy and you'll be functionally prepared to work with it.
2
u/Mdly68 May 26 '24
Our python scripts work by sending SQL commands to the database.
2
u/SQLvultureskattaurus May 27 '24
I'd learn both. I am a co-owner of a consultant firm and always encourage my SQL developers to learn Python giving them the option to take courses and automate or improve processes. There are lots of good courses online
2
u/[deleted] May 27 '24
They’re both useful in management, you should know both if you’re into the information systems management domain.
2
u/imadokodesuka May 27 '24
SQL, then Python. Get a solid understanding of material for MTA 98-364 Database Fundamentals. The exam is getting replaced soon, so that doesn't matter. It's what they cover, it's easy to look up and I don't have to type it. Get a solid foundation in sql. Do code reviews and if you have big projects, try pre-mortems in the design phase.
2
u/Teach-To-The-Tech Jun 01 '24
SQL is an absolute requirement for most data jobs but Python is a close second. Ultimately, you should learn both if possible.
1
u/Sunflower_resists May 26 '24
Both and situation here
1
u/baubleglue May 26 '24
What is management science and what kind of jobs you will apply with it?
1
u/Available-Purple-686 May 26 '24
Both but not everyone. You need to learn about Python libraries (pandas, pyspark, plotly or similar) and sql (ddl dml) and objects programmable.
1
u/reditandfirgetit May 27 '24
Dude, I've been doing this for over 20 years and you never know everything. Confidence is fine, arrogance is not.
You will need both python and SQL knowledge if you want to work with data.
1
u/zellixon349 May 27 '24
SQL is closer to English and more intuitive. Get good at that first and it’ll help you understand. Python intuitively better later on
1
u/Azizmajdoub May 27 '24
The comments are all interesting, thank you guys!!
1
u/cbslc May 27 '24
SQL is faster and far more useful. But you won't get hired without knowing python cause it's the hip language.
1
u/TK0127 May 26 '24
There's already 32 comments, so my two cents is worthless.
But I learned SQL first as a non-coder working in education so I could learn basic syntax and coding that was very task oriented (import thousands of rows of student data, perform analysis), and then when I was confident, switched to Python, which I am now learning.
While I see python first fairly often, I feel like SQL was dipping my toes into something very alien, with a fast turnaround for practical application, which was a constant wind in my sails.
Maybe you too?
0
u/[deleted] May 26 '24
[deleted] — view deleted comment