Add the package as a dev-dependency:
# With npm
npm install --save-dev jest-serializer-sql
# With yarn
yarn add --dev jest-serializer-sql
Update package.json to let Jest know about the serializer:
"jest": {
"snapshotSerializers": ["jest-serializer-sql"]
}