Source: https://www.gateway400.org/documents/Gateway400/Handouts/Advanced%20SQL%20Coding%20Gateway%20400%202011.pdf