working on SQL select plugin