Add dynamic sql queries