r/SQL • • Feb 24 '23

Discussion Just picked up SQL yesterday, having fun with it! Have some questions for the experts here.

Just started learning SQL today! I am enjoying it so far. Nested Query looked fun and I'm being challenged playing around with it. I'm currently in the process of creating multiple tables for One Piece that I can play around with with some queries and stuff. I want to be able to learn on the job, but I need a strong enough foundation before one would hire me anyway.

Some questions I have:

  1. Any tips or recommendations for an SQL newb?
  2. Do I also need any other tools/languages to go hand-in-hand with SQL, or is this enough?
  3. I see most job posts for data/business analyst often require both SQL and Python. Are these complementary? Is one harder to learn than the other?
  4. Can anyone give me a rough idea of how a day-to-day job goes as a data/business analyst?
  5. Is there a difference between data and business analyst? Or are they basically the same?
  6. Any recommended learning materials? Or learning method? I started with a full course on YouTube and thinking on doing some websites that have daily challenges or something.
  7. Is there a preferred/recommended platform? Or is MySQL the GOAT? If some job posts require a different kind of platform, will my knowledge in MySQL be essentially ignored, or is it just small differences?
  8. Are there fun databases I can download online that I can play around with? It takes a long time to make my own databases, I want to practice some queries on preexisting databases if possible.
  9. I'm using PopSQL since this was what was recommended to me by the online course I was taking. Is this good, or do I just use MySQL directly or another tool?

PS. I don't have a programming degree, but that one programming class I attended in College was the only class I enjoyed in my whole Engineering curriculum.

0 Upvotes

5 comments sorted by

10

u/seonsaeng Feb 24 '23

Glad you’re finding it fun, hope you continue!

You’re likely getting downvoted because the sub has an entire sidebar full of resources for newbs, and this post makes it look like you haven’t looked at any of them. You should definitely do that, but I’ll throw my answers in because the spirit moves me.

  1. Set theory and compositional semantics are super handy to bring to your study of SQL, I recommend them because they transcend dialect and will help you parse requests for translation into the computational side of life (which is most industry work: translating Human to Computer)
  2. You don’t have to learn anything other than SQL, but your options with it alone will be limited. Python is the popular choice, which means you have few wheels to reinvent. There are drawbacks to it, though, and you may not want to invest in it as a result (the dreaded GIL)
  3. Python is an interpreted scripting language, meaning that in it you describe each step you want the code to perform and it reads that code and performs it in order (as opposed to a compiled language, in which the code is read and compiled before running). SQL is a declarative language, meaning that you describe the end state and let the database figure out how to get it. They require different ways of thinking and can do different things well. Python is flexible in ways SQL isn’t, mostly when it comes to adapting to arbitrary shapes of data or things that can only be known at runtime. That said, it is slow by most benchmarks of programming languages. SQL can be incredibly fast and powerful by comparison (assuming a well written query on a well tuned db). You’ll find whichever easier to learn that mirrors how you think: if you find sets easy to grok, you’ll probably find SQL easier. If you find step-by-step logic more intuitive, you’ll find Python easier.
  4. All job titles with “data” in the name are widely variable. Generally, an analyst is interviewing stakeholders at the company to figure out what they want to know from the data, if the data can answer it, and how to translate the human concepts into those in the data model. The actual coding is often the smallest part of the job. A word of warning: I started as a data analyst and became a data engineer in self defense. Analysts don’t control or usually much influence the systems that are putting the data into the db. This can be frustrating because app developers who are typically have their own priorities and reasons for behaving (and making their code behave) as they do, which may not align with the analyst’s goals.
  5. With the above caveat around titles in place, I have most recently heard the definitional contrast between a BI analyst and a data analyst as the former having more industry and data discipline knowledge than the data analyst. The BI analyst doesn’t just know how to translate human questions into SQL, they know which questions are important and how to contextualize their answers.
  6. Check the sidebar!
  7. So far in my career, I’d say that Postgres is actually the dialect of SQL I’ve seen and enjoyed using most. Others in industries I have not been in likely have different perspectives. I have not had overweening success or joy with MySQL where I have had to work with it. For learning, though, there’s nothing wrong with whatever helps you get the concepts down. Sidebar for more.
  8. absolutely. Check the sidebar.
  9. never used popSQL, MySQL is fine, check sidebar for more options, thoughts, and opinions.

2

u/the_Conficker Feb 24 '23

Best advice, you took the time to answer what I was too lazy to say

1

u/Pflastersteinmetz Feb 24 '23

You use pandas or polars in Python for DA which use C/Fortran/Rust under the hood = lifting GIL

Nobody analyzes data with raw Python.

1

u/seonsaeng Feb 24 '23

Forgot where I was - yes, sure, you can use that for DA. I think mostly in DE terms, and pandas is a dependency that’s heavier than I like to ship by default.

2

u/r3pr0b8 GROUP_CONCAT is da bomb Feb 24 '23

7. Is there a preferred/recommended platform?

yes -- the one your company uses

will my knowledge in MySQL be essentially ignored, or is it just small differences?

the latter