Fix pb sql