At the core of DB2 on any platform is the Structured Query Language (SQL). SQL is a non-procedural language that allows you to define a task that should be performed by the database (i.e. retrieve some data) without specifying how that task should be performed. Check out this presentation by Joe Burns of Highmark that outlines some solutions to common problems with SQL.
Writing SQL - Techniques for common challenges