attempt at sql check

attempint to build an sql check