What is the best online SQL tutorial for learning how to write complex reporting queries?

My SQL skills are quite limited, and since I have been working with a database very often lately (Oracle), I would like to go beyond the basic select statements.

I want to write queries that do things such as retrieving data from multiple tables, summing up a quantity, comparing dates, groups, filters, etc.

Which sites can you recommend to get SQL reporting skills to a more advanced level?

+6
sql oracle reporting
source share
5 answers

Take Joe Celcko SQL for Smarties . This is one of the final books like "your-sql-to-the-next-level". Otherwise, just keep writing queries.

Make sure you understand the connections. Since the beginning of time, my SQL methodology has always been counted by the number of rows. In other words, when I write a complex query, I am always # 1, making sure that it returns the correct number of rows. If your rowcount is correct, then your amounts / groups / aggregates will be correct. And they are VERY easy to spoil.

Make sure you understand the data. Make sure you understand the keys and uniqueness so that you can apply your connections.

You can also read asktom.oracle.com for lots of really cool SQL tricks. Laurent Schneider is also very sql-wise in front of me. I would not be half the DBA / Developer that I am today if I had not asked asktom as my homepage for the last 5-6 years.

Finally, make sure you understand dial-based operations. Think of the multitude of results in general, not just the rowset. He will click when you do this. This refers to a methodology based on counting the number of rows.

+11
source share

I know this is not online, but it matches your account on T:

I would recommend compiling a copy of the Anthony Mollinaro SQL Cookbook . It describes how to do many complex things that go beyond the basic SELECT FROM WHERE. In advance when you make a lot of requests for a preview. work, this book was my saving life, and people borrowed this book a lot. There are many very clear examples in it, and they range from simple (how to get a subset of rows in a table) to a complex (using window functions to generate histograms).

It's not free, but the book will pay for itself pretty quickly, and I think it will answer most of the questions that you have. NOTE. I have no connection with O'Reilly or Mr. Mollinaro, I just think this book is awesome and ridiculously useful.

+4
source share

Check out Chapters 20, 21, and 22 of the Oracle Data Warehouse Guide: http://download.oracle.com/docs/cd/B28359_01/server.111/b28313/toc.htm . This is about grouping, analytics and a sample disclaimer.

+2
source share

The W3 School Textbook Tutorial is a good place to start. It gives some examples of different types of associations and details for many functions (i.e., Amount, Counter, Aug). I really needed to create a foundation in SQL before I understood complex queries.

+1
source share

I just found a site called SQL Tutorial, which in my opinion is very good and wanted to share with the community. It is at http://www.sql-tutorial.com/

+1
source share

All Articles