SQL Query takes to long to return data
===

Looking for a better way to write this query and my SQL skills aren't great, basic really so looking for any pointers to make this better. This is only the first two columns and the full report will have a further 10.

I'm taking a specific set of repair types and doing analysis on them with counts and calculations. The 1st is jobs brought forward to the current financial year and the second is total amount of jobs currently received.

        SELECT
      "Type",
      (
        SELECT
          NVL(COUNT(jjo.jjobno),0)
        FROM
          jjobh jjo
        WHERE
          jjo.jclcode     = 'L'
        AND jjo.jstatus  <> '6'
        AND jjo.year_rec <>
          (
            SELECT
              sub_code
            FROM
              code_table
            WHERE
              main_code = 'YEAR'
          )
        AND
          (
            week_comp IS NULL
          OR year_comp =
            (
              SELECT
                sub_code
              FROM
                code_table
              WHERE
                main_code = 'YEAR'
            )
          )
        AND jjo.jrepair_type = "Type"
      ) AS "B/F",
      (
        SELECT
          NVL(COUNT(jjo.jjobno),0)
        FROM
          jjobh jjo
        WHERE
          jjo.jclcode    = 'L'
        AND jjo.jstatus <> '6'
        AND jjo.year_rec =
          (
            SELECT
              sub_code
            FROM
              code_table
            WHERE
              main_code = 'YEAR'
          )
        AND jjo.jrepair_type = "Type"
      ) AS "Recvd"
    FROM
      (
        SELECT
          rep.repair_type_code AS "Type"
        FROM
          repair_type rep
        WHERE
          rep.client        = 'L'
        AND rep.work_centre = '004682'
        ORDER BY
          rep.repair_type_code
      )
    ORDER BY
      "Type";

