SQL - neo-anderson/Notes GitHub Wiki

Check multiple columns IS NOT NULL
http://stackoverflow.com/questions/8596004/oracle-sql-syntax-check-multiple-columns-for-is-not-null
With De Morgan's law:
NOT (A OR B) = (NOT A) AND (NOT B)

NOT (
weight IS NULL OR
weight_unit IS NULL OR
length IS NULL OR
width IS NULL OR
height IS NULL OR
dimensional_unit IS NULL 
)

Case insensitive SQL like
http://stackoverflow.com/questions/2876789/case-insensitive-for-sql-like-wildcard-statement

lower(column_name) like '%string%';

select distinct or unique rows

select distinct a, c
from table_c

Select Top N rows
http://www.w3schools.com/sql/sql_top.asp

table and column names in RedShift using SQL
http://stackoverflow.com/questions/21273439/how-do-i-get-table-and-columns-information-from-redshift