Sql Length Function Extract Data From Plot