Resolving draw problem on sql Query