Extremely relevant to my life.
I started with my company a little under three years ago.
Coming in, I had a layman's understanding of programming, or structured languages. Something = something.
Today, I can confidently write a query, specifying which data points I care about, what the qualifiers are, joining in other tables to create data sets, apply math logic to my queries (something less than something, sometimes times something), alter thousands of database entries with a simple statement, ect....
I'm not a smart man. Most of what I learned was at the feet of people who have been writing in SQL for years, and Googling SQL help pages.
But it basically comes down to two parts:
1. Your SELECT statement, where you say what datapoints you want
2. Your WHERE statement, where you place qualifiers on the data you want.
Most basic queries are built on this foundation. There's plenty of other more complicated stuff (subqueries, joins, aliasing, query magic), but if you can grok SELECT & WHERE, you can get your foot in the door.
It can help to study the conceptual model of databases too. Go read up on "Relational Databases."
Seriously, you want to know what I started learning SQL and database logic with?
http://www.amazon.com/Manga-Guide-Databases-Mana-Takahashi/dp/1593271905Don't fret. I'm not good at math, logical thinking or complex series of operations, but I managed to understand query writing and mysql to the point I can perform at an entry level position doing it. A crucial part starting out is....just break down a query into individual statements. It's much easier to understand when it's not one long, contiguous line of statements.
This is the webpage I use for my cheatsheet:
http://dev.mysql.com/doc/refman/5.5/en/string-functions.html#function_concat-wsAlso it really, REALLY helps to have a good database browser, once you've got the basics down. I'd recommend SQLYOG Community because it's free. It will be of no use to you without a working database, but in teaching yourself how to operate it, you can get ahead of the game. (All SQLYOG essentially does is run queries based on what you're doing in the UI. So for example when you right click and select "Create a new table", SQLYOG is running the query CREATE TABLE <name>; (simplified version of what it's doing) in the background. You could accomplish the same feat just by writing that query in the query window.
Let me know if there's something you would like some help understanding how to do.