sql code and demostrations