[development] Programmatically creating SQL queries