Creating newquery SQLQuery