corrected kort views sql