Output as sql because there's db specific work