SQL commands have been tested - cut and paste style.