-- DBMS: snowflake
create or replace TABLE KNOWNDRUGSAGGREGATED (
	"drugId" VARCHAR(16777216),
	"targetId" VARCHAR(16777216),
	"diseaseId" VARCHAR(16777216),
	"phase" FLOAT,
	"status" VARCHAR(16777216),
	"urls" VARIANT,
	"ancestors" VARIANT,
	"label" VARCHAR(16777216),
	"approvedSymbol" VARCHAR(16777216),
	"approvedName" VARCHAR(16777216),
	"targetClass" VARIANT,
	"prefName" VARCHAR(16777216),
	"tradeNames" VARIANT,
	"synonyms" VARIANT,
	"drugType" VARCHAR(16777216),
	"mechanismOfAction" VARCHAR(16777216),
	"targetName" VARCHAR(16777216)
);

INSERT INTO "OPEN_TARGETS_PLATFORM_2"."OPEN_TARGETS_PLATFORM"."KNOWNDRUGSAGGREGATED" (urls, drugId, status, tradeNames, label, targetId, approvedName, ancestors, targetName, phase, prefName, synonyms, drugType, approvedSymbol, diseaseId, mechanismOfAction, targetClass) VALUES ('{
  "list": [
    {
      "element": {
        "niceName": "ClinicalTrials",
        "url": "https://clinicaltrials.gov/study/NCT06365788"
      }
    }
  ]
}', 'CHEMBL409', 'Recruiting', '{
  "list": [
    {
      "element": "Bicalutamide"
    },
    {
      "element": "Calutide"
    },
    {
      "element": "Casodex"
    },
    {
      "element": "Cosudex"
    },
    {
      "element": "Kalumid"
    }
  ]
}', 'breast neoplasm', 'ENSG00000169083', 'androgen receptor', '{
  "list": [
    {
      "element": "OTAR_0000017"
    },
    {
      "element": "MONDO_0021350"
    },
    {
      "element": "MONDO_0023370"
    },
    {
      "element": "MONDO_0045024"
    },
    {
      "element": "EFO_0010285"
    },
    {
      "element": "EFO_0009483"
    },
    {
      "element": "EFO_0000616"
    }
  ]
}', 'Androgen Receptor', 2.0, 'BICALUTAMIDE', '{
  "list": [
    {
      "element": "Bicalutamide"
    },
    {
      "element": "Casodex"
    },
    {
      "element": "ICI 176,334"
    },
    {
      "element": "ICI-176334"
    },
    {
      "element": "ICI176,334-1"
    },
    {
      "element": "NSC-759816"
    }
  ]
}', 'Small molecule', 'AR', 'EFO_0003869', 'Androgen Receptor antagonist', '{
  "list": [
    {
      "element": "Transcription factor"
    },
    {
      "element": "Unclassified protein"
    }
  ]
}'), ('{
  "list": [
    {
      "element": {
        "niceName": "ClinicalTrials",
        "url": "https://clinicaltrials.gov/study/NCT01642732"
      }
    },
    {
      "element": {
        "niceName": "ClinicalTrials",
        "url": "https://clinicaltrials.gov/study/NCT00702923"
      }
    },
    {
      "element": {
        "niceName": "ClinicalTrials",
        "url": "https://clinicaltrials.gov/study/NCT00924807"
      }
    }
  ]
}', 'CHEMBL409', 'Terminated', '{
  "list": [
    {
      "element": "Bicalutamide"
    },
    {
      "element": "Calutide"
    },
    {
      "element": "Casodex"
    },
    {
      "element": "Cosudex"
    },
    {
      "element": "Kalumid"
    }
  ]
}', 'prostate cancer', 'ENSG00000169083', 'androgen receptor', '{
  "list": [
    {
      "element": "OTAR_0000017"
    },
    {
      "element": "EFO_0009555"
    },
    {
      "element": "EFO_0007355"
    },
    {
      "element": "MONDO_0024582"
    },
    {
      "element": "MONDO_0002149"
    },
    {
      "element": "MONDO_0023370"
    },
    {
      "element": "EFO_1000051"
    },
    {
      "element": "EFO_0009602"
    },
    {
      "element": "MONDO_0045024"
    },
    {
      "element": "MONDO_0021259"
    },
    {
      "element": "MONDO_0004992"
    },
    {
      "element": "EFO_0000512"
    },
    {
      "element": "EFO_0000616"
    }
  ]
}', 'Androgen Receptor', 1.0, 'BICALUTAMIDE', '{
  "list": [
    {
      "element": "Bicalutamide"
    },
    {
      "element": "Casodex"
    },
    {
      "element": "ICI 176,334"
    },
    {
      "element": "ICI-176334"
    },
    {
      "element": "ICI176,334-1"
    },
    {
      "element": "NSC-759816"
    }
  ]
}', 'Small molecule', 'AR', 'MONDO_0008315', 'Androgen Receptor antagonist', '{
  "list": [
    {
      "element": "Transcription factor"
    },
    {
      "element": "Unclassified protein"
    }
  ]
}'), ('{
  "list": [
    {
      "element": {
        "niceName": "ClinicalTrials",
        "url": "https://clinicaltrials.gov/study/NCT00012090"
      }
    }
  ]
}', 'CHEMBL409', 'Completed', '{
  "list": [
    {
      "element": "Bicalutamide"
    },
    {
      "element": "Calutide"
    },
    {
      "element": "Casodex"
    },
    {
      "element": "Cosudex"
    },
    {
      "element": "Kalumid"
    }
  ]
}', 'fallopian tube cancer', 'ENSG00000169083', 'androgen receptor', '{
  "list": [
    {
      "element": "OTAR_0000017"
    },
    {
      "element": "MONDO_0002149"
    },
    {
      "element": "MONDO_0021092"
    },
    {
      "element": "EFO_0009548"
    },
    {
      "element": "MONDO_0023370"
    },
    {
      "element": "EFO_1000051"
    },
    {
      "element": "MONDO_0021148"
    },
    {
      "element": "MONDO_0045024"
    },
    {
      "element": "MONDO_0004992"
    },
    {
      "element": "EFO_0000512"
    },
    {
      "element": "EFO_0009549"
    },
    {
      "element": "EFO_1001331"
    },
    {
      "element": "EFO_0000616"
    }
  ]
}', 'Androgen Receptor', 2.0, 'BICALUTAMIDE', '{
  "list": [
    {
      "element": "Bicalutamide"
    },
    {
      "element": "Casodex"
    },
    {
      "element": "ICI 176,334"
    },
    {
      "element": "ICI-176334"
    },
    {
      "element": "ICI176,334-1"
    },
    {
      "element": "NSC-759816"
    }
  ]
}', 'Small molecule', 'AR', 'MONDO_0002158', 'Androgen Receptor antagonist', '{
  "list": [
    {
      "element": "Transcription factor"
    },
    {
      "element": "Unclassified protein"
    }
  ]
}'), ('{
  "list": [
    {
      "element": {
        "niceName": "ClinicalTrials",
        "url": "https://clinicaltrials.gov/study/NCT00298155"
      }
    },
    {
      "element": {
        "niceName": "ClinicalTrials",
        "url": "https://clinicaltrials.gov/study/NCT00586898"
      }
    },
    {
      "element": {
        "niceName": "ClinicalTrials",
        "url": "https://clinicaltrials.gov/study/NCT00486642"
      }
    },
    {
      "element": {
        "niceName": "ClinicalTrials",
        "url": "https://clinicaltrials.gov/study/NCT00108732"
      }
    },
    {
      "element": {
        "niceName": "ClinicalTrials",
        "url": "https://clinicaltrials.gov/study/NCT02614859"
      }
    },
    {
      "element": {
        "niceName": "ClinicalTrials",
        "url": "https://clinicaltrials.gov/study/NCT00170157"
      }
    }
  ]
}', 'CHEMBL409', 'Completed', '{
  "list": [
    {
      "element": "Bicalutamide"
    },
    {
      "element": "Calutide"
    },
    {
      "element": "Casodex"
    },
    {
      "element": "Cosudex"
    },
    {
      "element": "Kalumid"
    }
  ]
}', 'prostate carcinoma', 'ENSG00000169083', 'androgen receptor', '{
  "list": [
    {
      "element": "OTAR_0000017"
    },
    {
      "element": "EFO_0009555"
    },
    {
      "element": "EFO_0007355"
    },
    {
      "element": "MONDO_0024582"
    },
    {
      "element": "MONDO_0002149"
    },
    {
      "element": "MONDO_0023370"
    },
    {
      "element": "EFO_1000051"
    },
    {
      "element": "EFO_0009602"
    },
    {
      "element": "MONDO_0045024"
    },
    {
      "element": "MONDO_0021259"
    },
    {
      "element": "MONDO_0004992"
    },
    {
      "element": "MONDO_0008315"
    },
    {
      "element": "EFO_0000512"
    },
    {
      "element": "EFO_0000313"
    },
    {
      "element": "EFO_0006858"
    },
    {
      "element": "EFO_0000616"
    }
  ]
}', 'Androgen Receptor', 2.0, 'BICALUTAMIDE', '{
  "list": [
    {
      "element": "Bicalutamide"
    },
    {
      "element": "Casodex"
    },
    {
      "element": "ICI 176,334"
    },
    {
      "element": "ICI-176334"
    },
    {
      "element": "ICI176,334-1"
    },
    {
      "element": "NSC-759816"
    }
  ]
}', 'Small molecule', 'AR', 'EFO_0001663', 'Androgen Receptor antagonist', '{
  "list": [
    {
      "element": "Transcription factor"
    },
    {
      "element": "Unclassified protein"
    }
  ]
}'), ('{
  "list": [
    {
      "element": {
        "niceName": "ATC",
        "url": "https://www.whocc.no/atc_ddd_index/?code=L02BB03"
      }
    }
  ]
}', 'CHEMBL409', NULL, '{
  "list": [
    {
      "element": "Bicalutamide"
    },
    {
      "element": "Calutide"
    },
    {
      "element": "Casodex"
    },
    {
      "element": "Cosudex"
    },
    {
      "element": "Kalumid"
    }
  ]
}', 'neoplasm', 'ENSG00000169083', 'androgen receptor', '{
  "list": [
    {
      "element": "MONDO_0023370"
    },
    {
      "element": "MONDO_0045024"
    }
  ]
}', 'Androgen Receptor', 4.0, 'BICALUTAMIDE', '{
  "list": [
    {
      "element": "Bicalutamide"
    },
    {
      "element": "Casodex"
    },
    {
      "element": "ICI 176,334"
    },
    {
      "element": "ICI-176334"
    },
    {
      "element": "ICI176,334-1"
    },
    {
      "element": "NSC-759816"
    }
  ]
}', 'Small molecule', 'AR', 'EFO_0000616', 'Androgen Receptor antagonist', '{
  "list": [
    {
      "element": "Transcription factor"
    },
    {
      "element": "Unclassified protein"
    }
  ]
}');