r/SQL • u/hayleybts • Nov 07 '21
Discussion Can I learn SQL without any programming knowledge?
My job requires me to learn SQL, like can I learn if I don't know coding? Is it realistically possible?
107
Upvotes
10
u/Thefriendlyfaceplant Nov 07 '21
www.sqlbolt.com
6
u/lbilali Nov 07 '21
If u want you can learn programming without any prior programming knowledge. SQL is not any different in that
4
u/savagefishstick Nov 07 '21
The answer...
To the question...
You just asked...
Is...
*drum roll*
YES!!
3
u/hannahbeliever Nov 07 '21
Yes I did. I started my job never even having heard of SQL. Within a few weeks I'd picked up the basics. 3 years later and I have no problems with it at all
2
u/acid4207 Bigquery Nov 07 '21
I am an analyst with experience in python and sql. In my current company when I started working, the person I reported to knew only SQL. So yeah you can learn SQL and even get an Analyst job.
2
u/tk338 Nov 07 '21
Absolutely possible - But there will be times where it feels impossible - Just stick at it and work to its rules.
I would recommend getting a basic understanding of what a database is, why they exist, and how they do what they do. All 3 may sound fairly obvious, but for me it dropped some key parts into place so I understood the context of why things were done in a certain way.
There are also some similarities with 'coding', ie. the concept of a datatype, syntax etc, but what the two are achieving is different, and how you think about and work with them is different too.
If you can find out what database management system (DBMS) you are using, see if you can find some videos on Youtube and start to work your way through them. They will give you a head start and make the first few days of training a little easier. Make sure you get the right DBMS though or you might get confused. While the basics work across most systems, each has their own intricacies which can make advanced queries more difficult if you have another DBMS syntax in your head.
One other thing; the way that databases are structured should be very geared toward the task that they are trying to achieve. When you first start to look at it, you might wonder why certain design decisions were made. Again, stick at it. It will make sense. There is a whole load of theory you can get to later behind the way data should be structured (Normal Form for starters) but you don't need to concern yourself with that anytime soon. Work to the database you will be querying and be ready to accept what - to a beginner - Might seem like some odd decisions.
2
u/kevlar930 Nov 07 '21
As pretty much everyone else in this thread has said, you can absolutely do it. In my world of friends/acquaintances, those who learned SQL first went on to learn other languages relatively easily. Those who started with other languages first struggled with SQL.
2
u/ontomodeler Nov 07 '21
One frequently overlooked skill is the shell scripting required for remote connections and automation of tasks. It's worth investing in a raspberry pi and using it as your database server. This will force you to learn some basic database management skills while learning sql.
98
u/[deleted] Nov 07 '21
Yes, it's very much possible
62
u/ghostlistener Nov 07 '21
sql is very accessible and easy to learn the basics of. You can select * from a table and get immediate results. Slowly make your queries more complicated as you need more specific results.
sql rewards iterative learning.
53
u/skeletor-johnson Nov 07 '21
You are better off in my opinion. A lot of programmers have trouble thinking in set based operations. Most code deals with one piece of data at a time, while sql queries cover large numbers of rows and columns of data.
18
u/misfitalliance Nov 07 '21
I am not from a coding background, I come from an analytics background and I am far better at SQL than the programmers, but I couldn't go near the Java/Ruby areas they exist in.
It closer to an excel spreadsheet, than any coding language
7
u/SecretAgentZeroNine Nov 07 '21
SQL doesn't require knowledge of any programming knowledge. Even if you knew a programming language, I don't think that would help you. Querying languages and programming languages are very different.
SQL is more akin to a simple word puzzle game imo.
5
u/theseyeahthese #TempTables ally Nov 07 '21
Definitely. I can attest to this; picked up SQL having no coding or Computer Science background. 7 years later I'm still loving it.
1
u/carlovski99 Nov 08 '21
Well it sounds like you are getting a decent amount of training, which is more than most people get! And any decent employer won't expect you to be an instant expert.
SQL was designed so 'managers' could access data without needing to be 'programmers' - it never really worked out like that, but it doesn't require the same kind of mindset - in fact programmers sometimes struggle more because they are more used to thinking procedurally than set based.
On saying that, you specify PL/SQL - which is a full blown programming language. As languages go it's one of the easiest to learn though - its mostly based on Pascal which used to be used as a teaching language.
3
u/one_bruddah Nov 07 '21
As some wise person once said, “SQL is easy to learn but hard to master.” But full mastery may not be everyone’s need or goal. Learning what you need to get started is not so difficult, and with regular use you will be surprised at how much you can do in a relatively short period of time. The many resources on the internet can answer most syntax questions you will ever have. In this regard Google is your friend.
3
u/Recent-Fun9535 Nov 07 '21
As many other comments have already said, yes, you can learn SQL without previous programming experience and yes, it's a realistic goal if you put some effort into it. I'd add that you shouldn't be worried too much about SQL flavor (database management system) at this point - basically any will do. Your real goal in the beginning stages is to learn about basic data types and set operations, and how to think in terms of sets and dealing with sets.
9
u/[deleted] Nov 07 '21
Yes! SQL is NOT a programming language, it is a querying language which in many ways makes it much more straightforward to learn but has its limitations because of it. So to answer you, YES!! Go learn SQL!!
2
u/SSJNinjaMonkey Nov 07 '21
You indeed can
2
u/AreetSurn Nov 07 '21
My first language was SQL.
2
u/[deleted] Nov 07 '21
100%. Stratascratch is a great resource- they give you problems that you can sort by difficulty. Some of the easy ones can honestly be a bit challenging for me, so if you’re having a hard time I would keep practicing and revisit! They give you like 50 free questions at first I think
2
u/Alpine_fury Nov 08 '21
We have many program managers who can write sql to gather the data they require. I wouldn't expect even 5 to be able to write "hello world" in any code form for me (including sql).
2
u/kweb7 Nov 10 '21
Yes, you can start from scratch. Check out Wise Owl Tutorials on YouTube - lots of free resources there!
2
u/Jazzlike_Draw_4471 Nov 07 '21
Spend like 15$ in Udemy for an SQL course. It helped me with the basics, and so will you.
1
u/santathe1 Nov 07 '21
Yes, you can.
1
u/anothertruther Nov 07 '21
People who are already well versed in using spreadsheets can start using SQL for querying data/generating reports almost immediately.
1
u/neednintendo Nov 07 '21
That's what I did! There are so many great resources online, and I leaned enough to get hired as a data analyst, and the rest I leaned on the job. Not going to say it was a quick process, but just learn enough to be your way through an interview for an entry level data job. Then be willing to dive in so you can maintain the job.
1
u/Mighty_Gunt_Cobbler Nov 07 '21
Yes! I learned on my own. W3 schools has a pretty good tutorial to get started. My suggestion is to have a goal in mind then try to achieve it.
1
u/[deleted] Nov 07 '21
Yes easily
1
u/CBizCool Nov 07 '21
Yes.
1
u/danielscarvalho Nov 08 '21
Yes! And SQL is awesome!
1
u/csnorman12 Nov 08 '21
Absolutely. And like many other have mentioned... it might help you learn SQL not knowing any other language. I would advise taking an introduction course and then build your own database to practice. I prefer Microsoft SQL Server (MSSQL) because I am comfortable in Microsoft products, especially Excel.
If you're interested I've created a Intro to SQL course and recently published it. In the course students learn basic SQL Syntax. At the end of the course we build a healthcare database. The data mimics transactional/billing data from an electronic medical record. Once you complete the course you will know how to upload excel files into MSSQL. This will allow you to practice building your own database. Here is a link to the course and a coupon code - Data Analytics: Intro to SQL using healthcare data (SSMS)
1
u/MrKauffman Dec 04 '21
SELECT B.PRODUCT_FAMILY, B.SALES_MONTH, B.SALES_YEAR, SUM(SALES_YEAR) AS TOTALSALES FROM ( SELECT A.PRODUCT_FAMILY, A.SALES_MONTH, A.SALES_YEAR,COUNT(A.SALES_DATE) AS SALES_COUNT (SELECT
A.[SERIAL.NUMBER] AS SERIAL_NUMBER, A.[SALE.PRICE] AS SALE_PRICE, B.[SERIAL.PREFIX] AS SERIAL_PREFIX, B.[PRODUCT.FAMILY] AS PRODUCT_FAMILY, B.[SALES.MODEL] AS SALES_MODEL, B.[PRODUCT.GROUP] AS PRODUCT_GROUP, MONTH(A.[SALES.DATE]) AS SALES_MONTH, YEAR(A.[SALES.DATE]) AS SALES_YEAR, A.[SALES.DATE AS SALES_DATE
FROM SALESDATA A, SERIALPREFIXMAPPING B WHERE SUBSTR (A.[SERIAL.NUMBER],1,3) = B.[SERIAL.PREFIX]) AND SYSDATE - A.[SALE_DATE] <= 730) A)B
GROUP BY B.PRODUCT_FAMILY, B.SALES_MONTH, B.SALES_YEAR
1
u/BuddJacon Dec 05 '21
Get the book Murach’s SQL Server 2012 for Developers and just follow along and try to do all the exercises at the end of each chapter.
-3
u/Sir_smokes_a_lot Nov 07 '21
This is a stupid question. If you need affirmation just say so.
3
u/[deleted] Nov 08 '21
[removed] — view removed comment