finished content for a better sql