Bonus Day 2. Creating Complex SQL Queries

Today, we will discuss, mostly by example, complex queries. Complex queries are an everyday part of life for the SQL programmer. Many of today's examples may prove to be useful to you as many are real examples that we have actually used. By the end of the day, you should understand

  • How SQL commands interact with each other

  • How functions, expressions, and operators can be used together

  • How to use complex arithmetic combinations in the SELECT clause

  • How to formulate complex queries on your own

Note

We have used Personal Oracle for today's examples. Although most of the examples are ANSI standard syntax, take note of the different options in your implementation of SQL if they differ from Oracle.

MySQL examples ...

Get Sams Teach Yourself SQL in 21 Days, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.