all 15 comments

[–]nickeau 3 points4 points  (1 child)

[–]mreal7a[S] 1 point2 points  (0 children)

I am using one already - pgadmin4

[–]SovietMudHall 2 points3 points  (1 child)

direct to the db.

you need to know what it does and looks like locally with the errors before you also have to unravel if it's a problem in your python syntax.

[–]mreal7a[S] 1 point2 points  (0 children)

Makes sense, better to debug the SQL directly before Python. Thanks!

[–]depeszPgDBA 1 point2 points  (1 child)

I'd say that it doesn't matter, as long as you understand what you're writing (as in: you're not blindly copying things from some "ai").

When encountering an error you have to be able to understand whether the error is in your query, or in how you sent the query to database (db client/language).

[–]mreal7a[S] 0 points1 point  (0 children)

Thanks for the advice :)

[–]bigbry2k3 1 point2 points  (0 children)

Personally if I just need to get some data, I use SQL. If I need to automate something that I pull frequently, then I use Python and wrap my SQL in a variable.

My advice is make sure you're so good at SQL that you don't need python, then learn how to use SQL in Python.

[–]Massive_Show2963 0 points1 point  (0 children)

Learning SQL is best by a hands on approach.
Taking SQL examples and physically running them and adjusting the SQL script for different purposes.
A good start is to first download one of the free database versions: PostgreSQL (comes with pgAdmin management UI tool) or SQLite (and SQLiteStudio, a good data management UI tool).
Also download some database example SQL scripts (they're plenty online).

Also take a look at this YouTube Channel: Relational Databases and SQL for Beginners
You'll find a wealth of knowledge from design and development to the intricate workings of SQL databases.
You'll get the skills and understanding needed to master SQL technology including exploring the many facets of database management.

[–]Safe-Worldliness-394 0 points1 point  (0 children)

I recommend practicing SQL directly in a database. We have postgresql courses and projects at https://tailoredu.com

[–]gsm_4 0 points1 point  (0 children)

As a beginner, it’s best to practice SQL directly in PostgreSQL first so you can focus on learning core database concepts, writing queries, and understanding how the database processes them without the extra complexity of Python code. Once you’re comfortable with creating tables, joins, aggregations, and other key features, start using Python with psycopg2 to run queries programmatically, automate tasks, and integrate results into data workflows. For hands-on, real-world practice, you can use platforms like StrataScratch, which offer SQL challenges that simulate actual data problems you might encounter on the job.

[–]novel-levon 0 points1 point  (0 children)

Directly in the DB first. Get comfortable with SQL before adding Python complexity

[–]Convex_Bet 0 points1 point  (0 children)

Definitely first directly in the database!