create db query
check