get server version by sql query