almost entire sql