9 ms·
Learn SQL Interactively on Khan Academy
- foxwoods 11y agoIt reminds me of the interactive SQL tutorial GalaXQL. [GalaXQL](http://sol.gfxile.net/galaxql.html http://sol.gfxile.net/galaxql.html)
- rhc2104 11y agoThis is great! I created http://sqlteaching.com http://sqlteaching.com , so it's wonderful to see Khan Academy's take. If anyone from KA would like to chat with me about SQL tutorials or anything else in general, feel free to reach out- rhc2104@columbia.edu
- tsumnia 11y agoI love your site and plan to use it as a teaching tool for my Wed Development course I'm teaching. As a request, are you working on a user system to record completed lessons? As an extension, are you looking into making a classroom management system akin to Codecademy? I'd love to create a classroom, have students log in, complete the necessary lessons and have the means to know where they are in the overall plan. If you'd like some help getting that going, let me know! I'm in the process of developing typing exercises for my courses to give students extra practice with the basics.
- rhc2104 11y agoHi tsumnia, Thanks for the feedback! One nice thing about SQL Teaching is that it is completely client-side. This is possible because somebody compiled SQLite to JavaScript: https://github.com/kripken/sql.js/ https://github.com/kripken/sql.js/ Thus, I would have a bias against adding a classroom management system which would require some kind of backend database that I would need to keep running (funny, I know). However, SQL Teaching is open source https://github.com/rhc2104/sqlteaching https://github.com/rhc2104/sqlteaching , so I would update the site if you were to add the feature, or you could just take the JavaScript files and integrate it into your site!
- tsumnia 11y agoNot funny at all! Its something that I am toying with on my end as well. I'll have to play with it this summer and let you know if I get anything rolling!
- pamelafox 11y agoPamela from KA here. We're using the same client-side SQL solution as sqlteaching.com (which is great!). Our editing environment is here and open source: https://github.com/Khan/live-editor https://github.com/Khan/live-editor KA does have classroom tools and progress reports, but we don't have the ability for teachers to create their own lessons (if that's what you're looking for). More details on that here: https://www.khanacademy.org/coach-res/reference-for-coaches/teaching-computing/a/tracking-progress-of-programming-students https://www.khanacademy.org/coach-res/reference-for-coaches/... It's a lot of work to create the classroom management itself (that's done by a whole separate team at KA) so it's not something most folks tack on to teaching sites.
- wildster 11y agoYour going to get a load of spam putting you email address up here like that.
- deleted 11y ago[deleted]
- kiyoto 11y agoI've definitely recommended your service to my friends looking to learn SQL. Also, I made my share of contribution to the SQL pedagogy by writing blog articles on "SQL for Excel Users": http://blog.treasuredata.com/blog/2014/12/05/learn-sql-by-calculating-customer-lifetime-value-part-1/ http://blog.treasuredata.com/blog/2014/12/05/learn-sql-by-ca...
- IkmoIkmo 11y agoThanks! Will check out both sites.
- deleted 11y ago[deleted]
- mswen 11y agoIt was nice to find your site in addition the the Khan Academy's SQL course. Maybe I will try to direct my kids to walk through this. I am curious if you know a resource that would start approximately where your site/tool stops. I know there are books and reference manuals - but I would love to see the intermediate SQL version of your tool - including things like cursors, stored procedures and Common Table Expressions. Or does SQL at the next level lose too much of its uniformity? And, you would have to make separate sites for PostgreSQL, MySQL, SQL Server etc.
- rhc2104 11y agoHi mswen, Unfortunately, I don't know of interactive tutorials that cover the things you mentioned. The Khan Academy tutorial and SQL Bolt seem to have a few topics not covered by SQL Teaching, so that is a start! (Mainly, write queries) SQL Teaching uses SQLite because that way I don't need to maintain a backend to the site. But if there are more advanced topics that can be taught by SQLite, feel free to make a issue in the repo. Pull requests are also welcome!
- mswen 11y agoI mainly learn now by looking up things when I have a need and then hoping to still remember it 3 months from now when I need it again. The material covered in your tutorial is kind of the daily bread and butter stuff that I use and am comfortable with, but I know just enough to understand that there is this whole other level to SQL querying - even without really dealing with Database Administration and index tuning. I guess I will just keep learning as the need becomes apparent. Anyway thanks for making your resource available.
- MarcScott 11y agoI used your site recently to help my GCSE students revise for their CS exam. It was perfect, so thanks for all your efforts in creating it.
- benbristow 11y agoHey. Thanks for this, it's absolutely fantastic. Been using SQL for a while now but never got the hang of joins and could never find an easy guide for them. This was the simplest explanation I could find.
- Obi_Juan_Kenobi 11y agoSome people find graphics like this helpful for conceptualizing them : http://www.codeproject.com/KB/database/Visual_SQL_Joins/Visual_SQL_JOINS_orig.jpg http://www.codeproject.com/KB/database/Visual_SQL_Joins/Visu...
- aprdm 11y agoThis was posted sometime ago and I really enjoyed : http://sqlbolt.com/?rp http://sqlbolt.com/?rp I will definitely check out Khan's academy course as well!
- ivan_ah 11y agoWow, KA hits another one in the outfield! The audio that highlights part of the code is awesome (much better than watching a passive video), and the fact that everything can be executed in real time is awesome. Good job!
- pamelafox 11y agoThanks! That environment is all open source, if you're ever looking for some OSS bugs to tackle :-) https://github.com/Khan/live-editor https://github.com/Khan/live-editor
- jlu 11y agoIs the recording and playback of course content part open sourced somewhere?
- pamelafox 11y agoThe recording part is there as well, in particular https://github.com/Khan/live-editor/blob/master/js/ui/record.js https://github.com/Khan/live-editor/blob/master/js/ui/record... These slides give a little high level overview of that: https://speakerdeck.com/pamelafox/teaching-programming-online-codemotion https://speakerdeck.com/pamelafox/teaching-programming-onlin... (slide 26)
- jlu 11y agoThat's great, thanks for pointing in the right direction, and great job btw!
- marktangotango 11y agoImo every developer should be comfortable with sql, upto joins at least. Basic data modelling is also invaluable.
- pcurve 11y agoSerious question...what kind of developer can you be without knowing SQL?
- havetoregister 11y agoI write mathematical optimization software. I haven't used SQL since my undergrad. I know that one of our teams though use SQLite to store benchmarking results or something.
- rifung 11y agoWeb developers don't have to know SQL if they are only doing front end work, since the routes they hit which may or may not use SQL are written by back end developers. Actually I'm a back end developer and I don't use SQL at all. I learned it (a bit at least) on my own just out of interest and random personal projects, but I don't use SQL at work at all; we only use DynamoDB.
- theoduino 11y agoOne who does lots of low-level C/Assembly programming. I know several people who do lots of low-level OS work, and don't use SQL.
- optimusclimb 11y agoNot that I hadn't already done plenty of CRUD in SQL in jobs prior, but for 4 years I worked on streaming stock quote servers. All in all the system had 500+ servers deployed in a tiered setup. No data was persisted to disk (save for some config), and no SQL was ever involved. Ticker symbols (CUSIPs) did need to be looked up and those went through our network, but the actual lookups went out to a service, and results were cached. That's just one example. I'm sure there are many.
- 11y ago
- kremlin 11y agoI'm doing the course, as it's something I haven't learned in depth yet. They mentioned pronunciation : 'S-Q-L' vs 'sequel'. I've always pronounced it S-Q-L. The lecturer implies there's no right answer, that 'sequel' is historical but 'S-Q-L' is preferred for international use. The annoying thing, though, is that in writing a choice has to be made. If someone pronounces it 'S-Q-L' then to read 'a SQL query' is weird -- it should say 'an SQL query'. And vice versa for someone who pronounces it 'sequel'. 'an sequel query' isn't right. So, in writing, what is correct? 'An sql query' or 'a sql query'?
- GuiA 11y agoSome languages, like French, have a group which can dictate what is and isn't correct in the language (as it turns out, the vast majority of French speaking people don't give a rat's butt about what the Académie Française thinks and still do as they please, but that's another story). In English, however, there is no such authority. Whether you are writing a SQL query or an SQL query is all up to you. Aren't you happy you don't have an old wrinkly white French dude to chastise you about which one is correct?
- derefr 11y agoSpeaking of the Académie Française—do published works in France get "French-picked" to conform to proper Académie grammar?
- dragonwriter 11y agoA choice has to be made in speech, as well. And, as there is no one clear correct answer in speech, and the choice in writing is based on the choice in speech, there is no one clear correct answer in writing. Choose one, and use it consistently within a given work, and you should be fine. Of course, if its a work on SQL, you can normally avoid "a(n) SQL query" and just say a "a query" (with SQL implicit from context) or, in the less-common situation where you need to distinguish it from a query in a different query language, "a query in SQL".
- strayptr 11y agoI believe it's written "[Aa]n? (sql|SQL) query" but it depends on which standard library your native language is using.
- dannyp32 11y agoDoes anyone know of a good data modeling course like this? I understand SQL, but I think I could still improve at data modeling.
- capkutay 11y agoTry Jennifer Widom's online course on databases: https://lagunita.stanford.edu/courses/Engineering/db/2014_1/about https://lagunita.stanford.edu/courses/Engineering/db/2014_1/...
- SQL2219 11y agovery nice. and if you're looking for a sql job, check this out, still in beta: http://www.jobdensity.com/QueryGrid.aspx?q=661&t=sql&qt=5/11/2015%207:41:56%20PM http://www.jobdensity.com/QueryGrid.aspx?q=661&t=sql&qt=5/11...
- graycat 11y agoSo far my experience is that getting a SQL query correct is fairly easy and usually fun but that the real difficulty, e.g., for SQL Server, is for the rest: (1) Installation. Grim. Barbed wire enema. Wiped out my Windows boot partition requiring that I reinstall everything starting with the Windows DVD. (2) Security. The stuff with users, logins, etc. and nearly everything in SQL Server Management Studio was clear as mud. In the end: (A) Assume that basically what is there is essentially old capabilities and access control lists, imagine how they might work, and make that a first guess. It helped. (B) Use SQL Server Management Studio only for passively reading but never for actual management where change things. (C) For each of the important steps in setting up security, do searches on the Internet, find standard text SQL statements, and try those. Save and profusely document the statements that do work. (D) Do system management only with SQL statements in simple text files and executed with the SQL Server command line utility SQLCMD.EXE. (3) Connection String. The last time I had to get a SQL Server connection string to work took a solid week of throwing things against a wall to see if they would stick. The effort was an unanesthetized upper molar root canal procedure.
- jndsn402 11y agoIf you want to get an understanding of basic SQL without all that overhead, you can try Microsoft Access.
- graycat 11y ago> basic SQL That was easy. Think of it as close to set theory! I needed to get through all the overhead stuff since I'm using SQL Server in the server farm for my startup. So, I have code for Web pages with ADO.NET and also some stand alone programs that do SQL Server queries. Again, the only difficult stuff was the overhead stuff, and it would appear that the Khan course would not cover that.
- ufmace 11y agoOh god, no more Access. Access has a weird semi-dialect of SQL where it's insanely picky about how you position parenthesis in multiple join statements. I found it impossible to get a query right without the graphical query generator, and that's after routinely writing 5-10 table joins in T-SQL. No thanks, I'd recommend Sqlite over it anyday for a lightweight database. Works great on command line or in any of dozens of helper tools on any platform, and it's Free.
- jeffdavis 11y agoThis is great... but I am torn because, as someone who has spent a lot of time with databases, I feel like there are many mistakes that can lead to confusion. First, it's not teaching standard SQL, it appears to be teaching MySQL. That means any user who tries out any other system will immediately run into confusing error messages about the double quotes. Not ideal, and totally unnecessary -- sticking to standard SQL should work reasonably well in MySQL anyway (at the beginner level, at least). Second, in the section "Creating Tables and Inserting Data", the teacher jumps into surrogate keys immediately. Again, I feel that is unnecessary and will just lead to confusion. The beauty of a relational database is that it connects with the real world; and having arbitrary numbers floating around destroys that beauty. I really hate to criticize, because I really support the effort. Hopefully my feedback is useful.
- marvel_boy 11y agoCould somebody confirm that SQLite is used to the course? By the way, this seems great!
- pamelafox 11y agoYep, confirmed. Here's a blog post by Brian who implemented the SQLite support in our editor: http://www.brianbondy.com/blog/id/168/sql-on-khan-academy-enabled-by-sqlite-sqljs-asmjs-and-emscripten/ http://www.brianbondy.com/blog/id/168/sql-on-khan-academy-en...
- marvel_boy 11y agoThanks pamelafox
- zachgalant 11y agoWe also have an interactive online SQL course at CodeHS (completely client side as well). You can check it out at https://codehs.com/sql https://codehs.com/sql or try out the first hour free at https://codehs.com/hoc https://codehs.com/hoc
- AlisdairO 11y agoIt's great to see KA getting involved in teaching SQL - I really think there's too little SQL literacy out there amongst devs in general. I created http://pgexercises.com http://pgexercises.com a while back, which goes up to some relatively tougher exercises. I'd be very happy to help out with KA's effort if it would be useful. Email is in my profile.