Learning SQL
Author
Discussion

RizzoTheRat

Original Poster:

29,063 posts

223 months

Wednesday 25th March 2020
quotequote all
Working from home and not that busy so there's the opportunity to do some training courses, but work unlikely to want to spend much on professional courses.

I'm not a programmer but we do use some stuff which is in SQL databases so it seems like a sensible thing to learn. There seem to be thousands of courses and resources out there, does anyone have any recommendations?

Jonny_gti

291 posts

111 months

Wednesday 25th March 2020
quotequote all
Code Academy has good SQL training and also sololearn.

Never you mind

1,507 posts

143 months

Wednesday 25th March 2020
quotequote all
select *
from training_courses
where course_name = 'SQL' or
course_name like 'Database%'
;


Hope that helps smile

LukeyP_

428 posts

85 months

Wednesday 25th March 2020
quotequote all
I'm no expert, but I get by using basic scripts for my job.

If ever doing an update, I always do the following;

Query;

BEGIN TRAN
Update tablename
Set client = 'UK'
where client = 'EN'

COMMIT

ROLLBACK

So basically you run the begin tran statement, updates the rows and then you can run a quick select afterwards to ensure the data looks OK. If so, highlight commit and run that. Changes made. If not, highlight rollback and run that.

Just remember to do this, otherwise you end up with locks on the database.

I always getting nervous just doing INSERT and DELETES without the above.

anonymous-user

85 months

Wednesday 25th March 2020
quotequote all
Youtube is good.

You really need a real life project though. Can be anything. Do you use spreadsheets in a databasey way at all? Maybe a personal finance records or something? Try converting it to a database. Having data you can 'relate' to, really moves things a long in my experience

Scabutz

8,880 posts

111 months

Wednesday 25th March 2020
quotequote all
Pluralsight have good courses and often do a free trial. Its not massively expensive either. Udemy also have some good stuff but you have to pay.

SQL is quite easy to learn, if the basics make sense to you. A lot of it is based on set theory. Good explanation here on how it overlaps:

https://www.sqlshack.com/mathematics-sql-server-fa...

You will need a database platform to work on. MySQL or Postgress SQL are free.

NNH

1,548 posts

163 months

Wednesday 25th March 2020
quotequote all
If you have used MS Access, there is a version of SQL baked into it. You can set up database queries using the MS wizard, then look at the quasi-SQL script produced to do the job.

Munter

31,331 posts

272 months

Wednesday 25th March 2020
quotequote all
Scabutz said:
Pluralsight have good courses and often do a free trial. Its not massively expensive either. Udemy also have some good stuff but you have to pay.

SQL is quite easy to learn, if the basics make sense to you. A lot of it is based on set theory. Good explanation here on how it overlaps:

https://www.sqlshack.com/mathematics-sql-server-fa...

You will need a database platform to work on. MySQL or Postgress SQL are free.
I'm going to guess when the OP said stuff at work was in SQL databases he's thinking MS SQL. So SQL Express might be his best bet to avoid interesting syntax issues down the road.

RizzoTheRat

Original Poster:

29,063 posts

223 months

Wednesday 25th March 2020
quotequote all
I've used Access a bit before and have done basic queries both with access's drag and drop approach and looking at and tweaking the generated SQL code. I'm not sure what system we have at work but I would assume it's MS, I can check easily enough.

Good thought on personal finances as a project. I do currently have a spreadsheet which does far too many lookups to categorise stuff so would be an ideal project. the only issue with that is if I'm learning on work time that's not something I wold be showing my boss as progress biggrin I could probably come up with a couple of smallish work based projects easily enough which I could set up at home with dummy data.

Had a quick look at Code Academy and SoloLearn and both look suitable, not looked at the other suggestions so far. I assume the model of some lessons free and they pay for more advances stuff is pretty common? Code Academy's £15/month sounds like a pretty good deal to be honest.

98elise

32,770 posts

192 months

Wednesday 25th March 2020
quotequote all
NNH said:
If you have used MS Access, there is a version of SQL baked into it. You can set up database queries using the MS wizard, then look at the quasi-SQL script produced to do the job.
It's awful to use though. I've been writing SQL and PL/SQL for years, but on my current project I have no access to proper database tools so had to resort to Access. No comments and no ability to highlight an run code.

Personally if I needed to learn from scratch I would download Oracle Express and use that, or the Microsoft equivalent if there is one. Oracle express is free (or was the last time I used it). It's far easier to edit and run scripts in a proper database environment.

Techonthenet is a great resource for learning expanding your knowledge (covers both SQL server and Oracle)

https://www.techonthenet.com/index.php

droopsnoot

14,740 posts

273 months

Wednesday 25th March 2020
quotequote all
Sambucket said:
You really need a real life project though.
Yep, fully agree with that. I can "play" with all sorts of languages and stuff, but only really learn anything when I'm trying to achieve something specific.


anxious_ant

2,626 posts

110 months

Wednesday 25th March 2020
quotequote all
I find wc3school great place to learn as you can experient with live examples.

paulrockliffe

16,632 posts

258 months

Thursday 26th March 2020
quotequote all
Sambucket said:
Youtube is good.

You really need a real life project though. Can be anything. Do you use spreadsheets in a databasey way at all? Maybe a personal finance records or something? Try converting it to a database. Having data you can 'relate' to, really moves things a long in my experience
Agree with this. I would start by learning data modelling and database design so you know what you're aiming for when you do your SQL. If you understand how the data should be structured and why then the SQL makes much more sense and querying your data is much much easier.

I would start by using PowerQuery and PowerPivot in Excel and then turn the results into an SQL Database and Queries later. PowerQuery will process bank statement downloads into a transaction database and you can then build your lookups to deal with cash withdrawals, categorisation, tagging, substitution and all the other things you need to do to make a bank statement make sense. PowerPivot will turn your resulting tables into a relational database model and let you draw the PivotTables you need.

If you've done that and the results are useful and make sense, then putting it on a server and using SQL will be fairly simple.

geeks

11,819 posts

170 months

Thursday 26th March 2020
quotequote all
And of course no SQL thread on PH is complete without the obligatory "Bobby Tables" XKCD comic!