SQL Assistance:

Here is a reference of most SQL statements: SQL Reference

 

Here are some useful examples:

DECODE Statement Sample

Here's a query that uses the DECODE statement.  so depending on the code in parenthesis, it will substitute the corresponding text.

SELECT
  table1.column1, table1.column2, table5.column2, table7.column1,  decode(table5.column3, 10, 'cat', 20, 'dog'), table7.column3
FROM
 tablespace.table1truenamename table1,
 tablespace.table2truenamename table2,
 tablespace.table3truenamename table3,
 tablespace.table4truenamename table4,
 tablespace.table5truenamename table5,
 tablespace.table6truenamename table6,
 tablespace.table7truenamename table7
WHERE
  table1.column1 = 20  AND table5.column2 = "animal" and table7.column1 > "06-APR-2001"
WITH READ ONLY;