Team Ai
Datasetpublic

zrx-kishore/nlp2sql

sourceHugging Faceupdated 3y agoView on Hugging Face
0likes13downloads
train.csv2278 linesDownload Raw Back to root
1input,instruction,output2"Hi! I need your help in generating an MySQL/ansi sql query.You are sql query generator all you should return is only query I am going to give you the schema associated with a database.3Name of the table is """"test_performance_v3"""".4Schema5Field Name | Field Type | Data Definition6NPI | varchar | 10 digit HCP identifier (Exclude blank and invalid NPIs from any queries)7Claim_ID | varchar | Unique claim identifier8Patient_ID | varchar | Unique patient identifier9Patient_Gender | varchar(8) | Patient Gender (Exclude """"Unknown"""" and blank values from any queries)10Patient_State | varchar | State in which prescription was filled (Exclude """"None"""" and blank values from any queries)11Region | varchar(9) | Region info of state12plan_type_description | varchar | Payor type (COMMERCIAL, MEDICARE, MEDICAID, etc.) in capital letters. (Exclude """"NONE"""" and blank values from any queries)13Plan_Name | varchar | Specific payor name14Drug_name | varchar | Brand or Drug name15Prescribed_Drug_Indication | varchar(2922) | Drug indication (based on prescribed drug)16Prescription_Fill_Year_Month | date | Date when prescription was filled17quantity | double | total quantity of drugs prescribed in each prescription18Total_Patient_Responsibility | double | Out of Pocket expense borne by patient19Total_Payer_Responsibility | double | Expense borne by payor20patient_age | integer | numeric age of patient in years21indication | string | Indications for given patient22Unknown_Flag | varchar(3) | If no disease detected, this would be Yes",What is Kyprolis's claims volume in the last 3 months?,"23 24SELECT COUNT(distinct(claim_ID)) AS num_prescriptions25FROM ""symphony-data"".""test_performance_v3""26WHERE Drug_Name like '%KYPROLIS%'27AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)28from ""symphony-data"".""test_performance_v3"") - interval '90' day);"29"Hi! I need your help in generating an MySQL/ansi sql query.You are sql query generator all you should return is only query I am going to give you the schema associated with a database.30Name of the table is """"test_performance_v3"""".31Schema32Field Name | Field Type | Data Definition33NPI | varchar | 10 digit HCP identifier (Exclude blank and invalid NPIs from any queries)34Claim_ID | varchar | Unique claim identifier35Patient_ID | varchar | Unique patient identifier36Patient_Gender | varchar(8) | Patient Gender (Exclude """"Unknown"""" and blank values from any queries)37Patient_State | varchar | State in which prescription was filled (Exclude """"None"""" and blank values from any queries)38Region | varchar(9) | Region info of state39plan_type_description | varchar | Payor type (COMMERCIAL, MEDICARE, MEDICAID, etc.) in capital letters. (Exclude """"NONE"""" and blank values from any queries)40Plan_Name | varchar | Specific payor name41Drug_name | varchar | Brand or Drug name42Prescribed_Drug_Indication | varchar(2922) | Drug indication (based on prescribed drug)43Prescription_Fill_Year_Month | date | Date when prescription was filled44quantity | double | total quantity of drugs prescribed in each prescription45Total_Patient_Responsibility | double | Out of Pocket expense borne by patient46Total_Payer_Responsibility | double | Expense borne by payor47patient_age | integer | numeric age of patient in years48indication | string | Indications for given patient49Unknown_Flag | varchar(3) | If no disease detected, this would be Yes",What is Kyprolis's claims volume in the last 3 months for MM indication?,"50 51SELECT COUNT(distinct(claim_ID)) AS num_prescriptions52FROM ""symphony-data"".""test_performance_v3""53WHERE Drug_Name like '%KYPROLIS%'54AND indication like '%MM%'55AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)56from ""symphony-data"".""test_performance_v3"") - interval '90' day);"57"Hi! I need your help in generating an MySQL/ansi sql query.You are sql query generator all you should return is only query I am going to give you the schema associated with a database.58Name of the table is """"test_performance_v3"""".59Schema60Field Name | Field Type | Data Definition61NPI | varchar | 10 digit HCP identifier (Exclude blank and invalid NPIs from any queries)62Claim_ID | varchar | Unique claim identifier63Patient_ID | varchar | Unique patient identifier64Patient_Gender | varchar(8) | Patient Gender (Exclude """"Unknown"""" and blank values from any queries)65Patient_State | varchar | State in which prescription was filled (Exclude """"None"""" and blank values from any queries)66Region | varchar(9) | Region info of state67plan_type_description | varchar | Payor type (COMMERCIAL, MEDICARE, MEDICAID, etc.) in capital letters. (Exclude """"NONE"""" and blank values from any queries)68Plan_Name | varchar | Specific payor name69Drug_name | varchar | Brand or Drug name70Prescribed_Drug_Indication | varchar(2922) | Drug indication (based on prescribed drug)71Prescription_Fill_Year_Month | date | Date when prescription was filled72quantity | double | total quantity of drugs prescribed in each prescription73Total_Patient_Responsibility | double | Out of Pocket expense borne by patient74Total_Payer_Responsibility | double | Expense borne by payor75patient_age | integer | numeric age of patient in years76indication | string | Indications for given patient77Unknown_Flag | varchar(3) | If no disease detected, this would be Yes",Which brand had the highest claims in MM indication in last 3 months?,"78 79SELECT Drug_Name, COUNT(distinct(claim_ID)) as num_prescriptions80FROM ""symphony-data"".""test_performance_v3""81WHERE indication like '%MM%'82AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)83from ""symphony-data"".""test_performance_v3"") - interval '90' day)84GROUP BY Drug_Name85ORDER BY num_prescriptions DESC86LIMIT 1;"87"Hi! I need your help in generating an MySQL/ansi sql query.You are sql query generator all you should return is only query I am going to give you the schema associated with a database.88Name of the table is """"test_performance_v3"""".89Schema90Field Name | Field Type | Data Definition91NPI | varchar | 10 digit HCP identifier (Exclude blank and invalid NPIs from any queries)92Claim_ID | varchar | Unique claim identifier93Patient_ID | varchar | Unique patient identifier94Patient_Gender | varchar(8) | Patient Gender (Exclude """"Unknown"""" and blank values from any queries)95Patient_State | varchar | State in which prescription was filled (Exclude """"None"""" and blank values from any queries)96Region | varchar(9) | Region info of state97plan_type_description | varchar | Payor type (COMMERCIAL, MEDICARE, MEDICAID, etc.) in capital letters. (Exclude """"NONE"""" and blank values from any queries)98Plan_Name | varchar | Specific payor name99Drug_name | varchar | Brand or Drug name100Prescribed_Drug_Indication | varchar(2922) | Drug indication (based on prescribed drug)101Prescription_Fill_Year_Month | date | Date when prescription was filled102quantity | double | total quantity of drugs prescribed in each prescription103Total_Patient_Responsibility | double | Out of Pocket expense borne by patient104Total_Payer_Responsibility | double | Expense borne by payor105patient_age | integer | numeric age of patient in years106indication | string | Indications for given patient107Unknown_Flag | varchar(3) | If no disease detected, this would be Yes",Which brand had the highest claims in NY state in MM indication in last 3 months?,"108 109SELECT Drug_Name, COUNT(distinct(claim_ID)) as num_prescriptions110FROM ""symphony-data"".""test_performance_v3""111WHERE indication like '%MM%'112AND Patient_State = 'NY'113AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)114from ""symphony-data"".""test_performance_v3"") - interval '90' day)115GROUP BY Drug_Name116ORDER BY num_prescriptions DESC117LIMIT 1;"118"Hi! I need your help in generating an MySQL/ansi sql query.You are sql query generator all you should return is only query I am going to give you the schema associated with a database.119Name of the table is """"test_performance_v3"""".120Schema121Field Name | Field Type | Data Definition122NPI | varchar | 10 digit HCP identifier (Exclude blank and invalid NPIs from any queries)123Claim_ID | varchar | Unique claim identifier124Patient_ID | varchar | Unique patient identifier125Patient_Gender | varchar(8) | Patient Gender (Exclude """"Unknown"""" and blank values from any queries)126Patient_State | varchar | State in which prescription was filled (Exclude """"None"""" and blank values from any queries)127Region | varchar(9) | Region info of state128plan_type_description | varchar | Payor type (COMMERCIAL, MEDICARE, MEDICAID, etc.) in capital letters. (Exclude """"NONE"""" and blank values from any queries)129Plan_Name | varchar | Specific payor name130Drug_name | varchar | Brand or Drug name131Prescribed_Drug_Indication | varchar(2922) | Drug indication (based on prescribed drug)132Prescription_Fill_Year_Month | date | Date when prescription was filled133quantity | double | total quantity of drugs prescribed in each prescription134Total_Patient_Responsibility | double | Out of Pocket expense borne by patient135Total_Payer_Responsibility | double | Expense borne by payor136patient_age | integer | numeric age of patient in years137indication | string | Indications for given patient138Unknown_Flag | varchar(3) | If no disease detected, this would be Yes",Identify the state where Kyprolis had the most prescriptions for MM indications? Ignore blanks for state,"139 140SELECT Patient_State, COUNT(distinct(Claim_ID)) as num_prescriptions141FROM ""symphony-data"".""test_performance_v3""142WHERE Drug_Name like '%KYPROLIS%'143AND indication like '%MM%'144AND Patient_State NOT LIKE 'None'145AND Patient_State NOT LIKE ''146GROUP BY Patient_State147ORDER BY num_prescriptions DESC148LIMIT 1;"149"Hi! I need your help in generating an MySQL/ansi sql query.You are sql query generator all you should return is only query I am going to give you the schema associated with a database.150Name of the table is """"test_performance_v3"""".151Schema152Field Name | Field Type | Data Definition153NPI | varchar | 10 digit HCP identifier (Exclude blank and invalid NPIs from any queries)154Claim_ID | varchar | Unique claim identifier155Patient_ID | varchar | Unique patient identifier156Patient_Gender | varchar(8) | Patient Gender (Exclude """"Unknown"""" and blank values from any queries)157Patient_State | varchar | State in which prescription was filled (Exclude """"None"""" and blank values from any queries)158Region | varchar(9) | Region info of state159plan_type_description | varchar | Payor type (COMMERCIAL, MEDICARE, MEDICAID, etc.) in capital letters. (Exclude """"NONE"""" and blank values from any queries)160Plan_Name | varchar | Specific payor name161Drug_name | varchar | Brand or Drug name162Prescribed_Drug_Indication | varchar(2922) | Drug indication (based on prescribed drug)163Prescription_Fill_Year_Month | date | Date when prescription was filled164quantity | double | total quantity of drugs prescribed in each prescription165Total_Patient_Responsibility | double | Out of Pocket expense borne by patient166Total_Payer_Responsibility | double | Expense borne by payor167patient_age | integer | numeric age of patient in years168indication | string | Indications for given patient169Unknown_Flag | varchar(3) | If no disease detected, this would be Yes",What was the market share of the top 5 drugs prescribed for MM indication over the last 3 months?,"170 171WITH top_5_drugs AS (172SELECT Drug_Name, count (distinct(claim_id)) as prescription_count173FROM ""symphony-data"".""test_performance_v3""174WHERE indication like '%MM%'175AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)176from ""symphony-data"".""test_performance_v3"") - interval '90' day)177GROUP BY Drug_Name178order by prescription_count desc179limit 5180),181total_prescriptions AS (182SELECT COUNT(distinct(claim_ID)) AS total_prescriptions183FROM ""symphony-data"".""test_performance_v3""184WHERE indication like '%MM%'185AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)186from ""symphony-data"".""test_performance_v3"") - interval '90' day)187)188SELECT 189top_5_drugs.Drug_Name, 190ROUND(100.0 * top_5_drugs.prescription_count / total_prescriptions.total_prescriptions, 2) as market_share191FROM top_5_drugs, total_prescriptions;"192"Hi! I need your help in generating an MySQL/ansi sql query.You are sql query generator all you should return is only query I am going to give you the schema associated with a database.193Name of the table is """"test_performance_v3"""".194Schema195Field Name | Field Type | Data Definition196NPI | varchar | 10 digit HCP identifier (Exclude blank and invalid NPIs from any queries)197Claim_ID | varchar | Unique claim identifier198Patient_ID | varchar | Unique patient identifier199Patient_Gender | varchar(8) | Patient Gender (Exclude """"Unknown"""" and blank values from any queries)200Patient_State | varchar | State in which prescription was filled (Exclude """"None"""" and blank values from any queries)201Region | varchar(9) | Region info of state202plan_type_description | varchar | Payor type (COMMERCIAL, MEDICARE, MEDICAID, etc.) in capital letters. (Exclude """"NONE"""" and blank values from any queries)203Plan_Name | varchar | Specific payor name204Drug_name | varchar | Brand or Drug name205Prescribed_Drug_Indication | varchar(2922) | Drug indication (based on prescribed drug)206Prescription_Fill_Year_Month | date | Date when prescription was filled207quantity | double | total quantity of drugs prescribed in each prescription208Total_Patient_Responsibility | double | Out of Pocket expense borne by patient209Total_Payer_Responsibility | double | Expense borne by payor210patient_age | integer | numeric age of patient in years211indication | string | Indications for given patient212Unknown_Flag | varchar(3) | If no disease detected, this would be Yes",Give me the market share by drug for the top 5 drugs for MM indication over the last 3 months,"213 214WITH215top_5_drugs AS (216SELECT Drug_Name, count (distinct(claim_id)) as prescription_count217FROM ""symphony-data"".""test_performance_v3""218WHERE indication like '%MM%'219AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)220from ""symphony-data"".""test_performance_v3"") - interval '90' day)221GROUP BY Drug_Name222order by prescription_count desc223limit 5224),225total_claims AS (226SELECT COUNT(distinct(claim_ID)) AS total_claims227FROM ""symphony-data"".""test_performance_v3""228WHERE indication like '%MM%'229AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)230from ""symphony-data"".""test_performance_v3"") - interval '90' day)231)232SELECT 233top_5_drugs.Drug_Name, 234ROUND(100.0 * top_5_drugs.prescription_count / total_claims.total_claims, 2) as market_share 235FROM top_5_drugs, total_claims;"236"Hi! I need your help in generating an MySQL/ansi sql query.You are sql query generator all you should return is only query I am going to give you the schema associated with a database.237Name of the table is """"test_performance_v3"""".238Schema239Field Name | Field Type | Data Definition240NPI | varchar | 10 digit HCP identifier (Exclude blank and invalid NPIs from any queries)241Claim_ID | varchar | Unique claim identifier242Patient_ID | varchar | Unique patient identifier243Patient_Gender | varchar(8) | Patient Gender (Exclude """"Unknown"""" and blank values from any queries)244Patient_State | varchar | State in which prescription was filled (Exclude """"None"""" and blank values from any queries)245Region | varchar(9) | Region info of state246plan_type_description | varchar | Payor type (COMMERCIAL, MEDICARE, MEDICAID, etc.) in capital letters. (Exclude """"NONE"""" and blank values from any queries)247Plan_Name | varchar | Specific payor name248Drug_name | varchar | Brand or Drug name249Prescribed_Drug_Indication | varchar(2922) | Drug indication (based on prescribed drug)250Prescription_Fill_Year_Month | date | Date when prescription was filled251quantity | double | total quantity of drugs prescribed in each prescription252Total_Patient_Responsibility | double | Out of Pocket expense borne by patient253Total_Payer_Responsibility | double | Expense borne by payor254patient_age | integer | numeric age of patient in years255indication | string | Indications for given patient256Unknown_Flag | varchar(3) | If no disease detected, this would be Yes",What was the market share for Kyprolis for years 2021 and 2022 for MM indication?,"257 258WITH259kyprolis_2021 AS (260SELECT COUNT(distinct(claim_ID)) AS num_prescriptions261FROM ""symphony-data"".""test_performance_v3""262WHERE Drug_Name like '%KYPROLIS%'263AND Prescription_Fill_Year_Month >= date('2021-01-01')264AND Prescription_Fill_Year_Month <= date('2021-12-31')265AND indication like '%MM%'266),267kyprolis_2022 AS (268SELECT COUNT(distinct(claim_ID)) AS num_prescriptions269FROM ""symphony-data"".""test_performance_v3""270WHERE Drug_Name like '%KYPROLIS%'271AND Prescription_Fill_Year_Month >= date('2022-01-01')272AND Prescription_Fill_Year_Month <= date('2022-12-31')273AND indication like '%MM%'274),275total_2021 AS (276SELECT COUNT(distinct(claim_ID)) AS num_prescriptions277FROM ""symphony-data"".""test_performance_v3""278WHERE Prescription_Fill_Year_Month >= date('2021-01-01')279AND Prescription_Fill_Year_Month <= date('2021-12-31')280AND indication like '%MM%'281),282total_2022 AS (283SELECT COUNT(distinct(claim_ID)) AS num_prescriptions284FROM ""symphony-data"".""test_performance_v3""285WHERE Prescription_Fill_Year_Month >= date('2022-01-01')286AND Prescription_Fill_Year_Month <= date('2022-12-31')287AND indication like '%MM%'288)289SELECT 290ROUND(100.0 * kyprolis_2021.num_prescriptions / total_2021.num_prescriptions, 2) AS kyprolis_2021_market_share,291ROUND(100.0 * kyprolis_2022.num_prescriptions / total_2022.num_prescriptions, 2) AS kyprolis_2022_market_share292FROM kyprolis_2021, kyprolis_2022, total_2021, total_2022;"293"Hi! I need your help in generating an MySQL/ansi sql query.You are sql query generator all you should return is only query I am going to give you the schema associated with a database.294Name of the table is """"test_performance_v3"""".295Schema296Field Name | Field Type | Data Definition297NPI | varchar | 10 digit HCP identifier (Exclude blank and invalid NPIs from any queries)298Claim_ID | varchar | Unique claim identifier299Patient_ID | varchar | Unique patient identifier300Patient_Gender | varchar(8) | Patient Gender (Exclude """"Unknown"""" and blank values from any queries)301Patient_State | varchar | State in which prescription was filled (Exclude """"None"""" and blank values from any queries)302Region | varchar(9) | Region info of state303plan_type_description | varchar | Payor type (COMMERCIAL, MEDICARE, MEDICAID, etc.) in capital letters. (Exclude """"NONE"""" and blank values from any queries)304Plan_Name | varchar | Specific payor name305Drug_name | varchar | Brand or Drug name306Prescribed_Drug_Indication | varchar(2922) | Drug indication (based on prescribed drug)307Prescription_Fill_Year_Month | date | Date when prescription was filled308quantity | double | total quantity of drugs prescribed in each prescription309Total_Patient_Responsibility | double | Out of Pocket expense borne by patient310Total_Payer_Responsibility | double | Expense borne by payor311patient_age | integer | numeric age of patient in years312indication | string | Indications for given patient313Unknown_Flag | varchar(3) | If no disease detected, this would be Yes",What's the most prescribed brand for MM indication? What is it's market share?,"314 315WITH num AS (316SELECT COUNT(DISTINCT(Claim_ID)) AS num_data 317FROM ""symphony-data"".""test_performance_v3"" 318WHERE indication LIKE '%MM%' 319AND Drug_Name IN (SELECT Drug_Name 320                  FROM ""symphony-data"".""test_performance_v3"" 321                  WHERE indication LIKE '%MM%' 322                  GROUP BY Drug_Name 323                  ORDER BY COUNT(DISTINCT(Claim_ID)) DESC 324                  LIMIT 1)325),326den AS (327SELECT COUNT(DISTINCT(Claim_ID)) AS den_data 328FROM ""symphony-data"".""test_performance_v3"" 329WHERE indication LIKE '%MM%'330)331SELECT ROUND(100.0 * num_data / den_data, 2) AS market_share 332FROM num, den;"333"Hi! I need your help in generating an MySQL/ansi sql query.You are sql query generator all you should return is only query I am going to give you the schema associated with a database.334Name of the table is """"test_performance_v3"""".335Schema336Field Name | Field Type | Data Definition337NPI | varchar | 10 digit HCP identifier (Exclude blank and invalid NPIs from any queries)338Claim_ID | varchar | Unique claim identifier339Patient_ID | varchar | Unique patient identifier340Patient_Gender | varchar(8) | Patient Gender (Exclude """"Unknown"""" and blank values from any queries)341Patient_State | varchar | State in which prescription was filled (Exclude """"None"""" and blank values from any queries)342Region | varchar(9) | Region info of state343plan_type_description | varchar | Payor type (COMMERCIAL, MEDICARE, MEDICAID, etc.) in capital letters. (Exclude """"NONE"""" and blank values from any queries)344Plan_Name | varchar | Specific payor name345Drug_name | varchar | Brand or Drug name346Prescribed_Drug_Indication | varchar(2922) | Drug indication (based on prescribed drug)347Prescription_Fill_Year_Month | date | Date when prescription was filled348quantity | double | total quantity of drugs prescribed in each prescription349Total_Patient_Responsibility | double | Out of Pocket expense borne by patient350Total_Payer_Responsibility | double | Expense borne by payor351patient_age | integer | numeric age of patient in years352indication | string | Indications for given patient353Unknown_Flag | varchar(3) | If no disease detected, this would be Yes","Over the past 3 months, which state in the US has seen a higher number of claims for Kyprolis in the MM indication compared to its competitors?","354 355WITH kyprolis_claims AS (356SELECT Patient_State, COUNT(distinct(claim_ID)) AS num_claims357FROM ""symphony-data"".""test_performance_v3""358WHERE Drug_Name like '%KYPROLIS%'359AND indication like '%MM%'360AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)361from ""symphony-data"".""test_performance_v3"") - interval '90' day)362GROUP BY Patient_State363),364competitor_claims AS (365SELECT Patient_State, COUNT(distinct(claim_ID)) AS num_claims366FROM ""symphony-data"".""test_performance_v3""367WHERE Drug_Name not like '%KYPROLIS%'368AND indication like '%MM%'369AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)370from ""symphony-data"".""test_performance_v3"") - interval '90' day)371GROUP BY Patient_State372)373SELECT kyprolis_claims.Patient_State374FROM kyprolis_claims, competitor_claims375WHERE kyprolis_claims.num_claims > competitor_claims.num_claims;"376"Hi! I need your help in generating an MySQL/ansi sql query.You are sql query generator all you should return is only query I am going to give you the schema associated with a database.377Name of the table is """"test_performance_v3"""".378Schema379Field Name | Field Type | Data Definition380NPI | varchar | 10 digit HCP identifier (Exclude blank and invalid NPIs from any queries)381Claim_ID | varchar | Unique claim identifier382Patient_ID | varchar | Unique patient identifier383Patient_Gender | varchar(8) | Patient Gender (Exclude """"Unknown"""" and blank values from any queries)384Patient_State | varchar | State in which prescription was filled (Exclude """"None"""" and blank values from any queries)385Region | varchar(9) | Region info of state386plan_type_description | varchar | Payor type (COMMERCIAL, MEDICARE, MEDICAID, etc.) in capital letters. (Exclude """"NONE"""" and blank values from any queries)387Plan_Name | varchar | Specific payor name388Drug_name | varchar | Brand or Drug name389Prescribed_Drug_Indication | varchar(2922) | Drug indication (based on prescribed drug)390Prescription_Fill_Year_Month | date | Date when prescription was filled391quantity | double | total quantity of drugs prescribed in each prescription392Total_Patient_Responsibility | double | Out of Pocket expense borne by patient393Total_Payer_Responsibility | double | Expense borne by payor394patient_age | integer | numeric age of patient in years395indication | string | Indications for given patient396Unknown_Flag | varchar(3) | If no disease detected, this would be Yes",What is the relative growth of Kyprolis in last 3 months compared to previous year?,"397 398WITH399numerator AS (400select count(Distinct(claim_ID)) as total_claims from ""symphony-data"".""test_performance_v3"" where Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)401from ""symphony-data"".""test_performance_v3"") - interval '3' month) and Drug_Name like '%KYPROLIS%'402),403denominator AS(404select count(distinct(claim_ID)) as total_claims from ""symphony-data"".""test_performance_v3"" where Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)405from ""symphony-data"".""test_performance_v3"") - interval '1' year - interval '3' month) and Prescription_Fill_Year_Month <= date((select max(Prescription_Fill_Year_Month)406from ""symphony-data"".""test_performance_v3"") - interval '1' year) and Drug_Name like '%KYPROLIS%'407)408SELECT (cast(numerator.total_claims as double) / (denominator.total_claims)-1)*100 as relative_growth from numerator, denominator;"409"Hi! I need your help in generating an MySQL/ansi sql query.You are sql query generator all you should return is only query I am going to give you the schema associated with a database.410Name of the table is """"test_performance_v3"""".411Schema412Field Name | Field Type | Data Definition413NPI | varchar | 10 digit HCP identifier (Exclude blank and invalid NPIs from any queries)414Claim_ID | varchar | Unique claim identifier415Patient_ID | varchar | Unique patient identifier416Patient_Gender | varchar(8) | Patient Gender (Exclude """"Unknown"""" and blank values from any queries)417Patient_State | varchar | State in which prescription was filled (Exclude """"None"""" and blank values from any queries)418Region | varchar(9) | Region info of state419plan_type_description | varchar | Payor type (COMMERCIAL, MEDICARE, MEDICAID, etc.) in capital letters. (Exclude """"NONE"""" and blank values from any queries)420Plan_Name | varchar | Specific payor name421Drug_name | varchar | Brand or Drug name422Prescribed_Drug_Indication | varchar(2922) | Drug indication (based on prescribed drug)423Prescription_Fill_Year_Month | date | Date when prescription was filled424quantity | double | total quantity of drugs prescribed in each prescription425Total_Patient_Responsibility | double | Out of Pocket expense borne by patient426Total_Payer_Responsibility | double | Expense borne by payor427patient_age | integer | numeric age of patient in years428indication | string | Indications for given patient429Unknown_Flag | varchar(3) | If no disease detected, this would be Yes",How did Kyprolis prescriptions for MM indication grow for 2021 vs 2020?,"430 431WITH432kyprolis_prescriptions_2021 AS (433SELECT COUNT(distinct(claim_ID)) AS num_prescriptions434FROM ""symphony-data"".""test_performance_v3""435WHERE Drug_Name like '%KYPROLIS%'436AND indication like '%MM%'437AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)438from ""symphony-data"".""test_performance_v3"") - interval '1' year)439AND Prescription_Fill_Year_Month < date((select max(Prescription_Fill_Year_Month)440from ""symphony-data"".""test_performance_v3""))441),442kyprolis_prescriptions_2020 AS (443SELECT COUNT(distinct(claim_ID)) AS num_prescriptions444FROM ""symphony-data"".""test_performance_v3""445WHERE Drug_Name like '%KYPROLIS%'446AND indication like '%MM%'447AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)448from ""symphony-data"".""test_performance_v3"") - interval '2' year)449AND Prescription_Fill_Year_Month < date((select max(Prescription_Fill_Year_Month)450from ""symphony-data"".""test_performance_v3"") - interval '1' year)451)452SELECT (cast(kyprolis_prescriptions_2021.num_prescriptions as double) / (kyprolis_prescriptions_2020.num_prescriptions)-1)*100 as growth from kyprolis_prescriptions_2021, kyprolis_prescriptions_2020;"453"Hi! I need your help in generating an MySQL/ansi sql query.You are sql query generator all you should return is only query I am going to give you the schema associated with a database.454Name of the table is """"test_performance_v3"""".455Schema456Field Name | Field Type | Data Definition457NPI | varchar | 10 digit HCP identifier (Exclude blank and invalid NPIs from any queries)458Claim_ID | varchar | Unique claim identifier459Patient_ID | varchar | Unique patient identifier460Patient_Gender | varchar(8) | Patient Gender (Exclude """"Unknown"""" and blank values from any queries)461Patient_State | varchar | State in which prescription was filled (Exclude """"None"""" and blank values from any queries)462Region | varchar(9) | Region info of state463plan_type_description | varchar | Payor type (COMMERCIAL, MEDICARE, MEDICAID, etc.) in capital letters. (Exclude """"NONE"""" and blank values from any queries)464Plan_Name | varchar | Specific payor name465Drug_name | varchar | Brand or Drug name466Prescribed_Drug_Indication | varchar(2922) | Drug indication (based on prescribed drug)467Prescription_Fill_Year_Month | date | Date when prescription was filled468quantity | double | total quantity of drugs prescribed in each prescription469Total_Patient_Responsibility | double | Out of Pocket expense borne by patient470Total_Payer_Responsibility | double | Expense borne by payor471patient_age | integer | numeric age of patient in years472indication | string | Indications for given patient473Unknown_Flag | varchar(3) | If no disease detected, this would be Yes",Calculate evolution index for Kyprolis for MM indication for the last 3 months versus same time period last year,"474 475WITH476kyprolis_prescriptions_current AS (477SELECT COUNT(distinct(claim_ID)) AS num_prescriptions478FROM ""symphony-data"".""test_performance_v3""479WHERE Drug_Name like '%KYPROLIS%'480AND indication like '%MM%'481AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)482from ""symphony-data"".""test_performance_v3"") - interval '3' month)483),484kyprolis_prescriptions_previous AS (485SELECT COUNT(distinct(claim_ID)) AS num_prescriptions486FROM ""symphony-data"".""test_performance_v3""487WHERE Drug_Name like '%KYPROLIS%'488AND indication like '%MM%'489AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)490from ""symphony-data"".""test_performance_v3"") - interval '1' year - interval '3' month)491AND Prescription_Fill_Year_Month <= date((select max(Prescription_Fill_Year_Month)492from ""symphony-data"".""test_performance_v3"") - interval '1' year)493),494mm_prescriptions_current AS (495SELECT COUNT(distinct(claim_ID)) AS num_prescriptions496FROM ""symphony-data"".""test_performance_v3""497WHERE indication like '%MM%'498AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)499from ""symphony-data"".""test_performance_v3"") - interval '3' month)500),501mm_prescriptions_previous AS (502SELECT COUNT(distinct(claim_ID)) AS num_prescriptions503FROM ""symphony-data"".""test_performance_v3""504WHERE indication like '%MM%'505AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)506from ""symphony-data"".""test_performance_v3"") - interval '1' year - interval '3' month)507AND Prescription_Fill_Year_Month <= date((select max(Prescription_Fill_Year_Month)508from ""symphony-data"".""test_performance_v3"") - interval '1' year)509)510SELECT 511ROUND(((1 + (cast(kyprolis_prescriptions_current.num_prescriptions as double) / kyprolis_prescriptions_previous.num_prescriptions - 1)) / (1 + (cast(mm_prescriptions_current.num_prescriptions as double) / mm_prescriptions_previous.num_prescriptions - 1))) ,2) as evolution_index"512"Hi! I need your help in generating an MySQL/ansi sql query.You are sql query generator all you should return is only query I am going to give you the schema associated with a database.513Name of the table is """"test_performance_v3"""".514Schema515Field Name | Field Type | Data Definition516NPI | varchar | 10 digit HCP identifier (Exclude blank and invalid NPIs from any queries)517Claim_ID | varchar | Unique claim identifier518Patient_ID | varchar | Unique patient identifier519Patient_Gender | varchar(8) | Patient Gender (Exclude """"Unknown"""" and blank values from any queries)520Patient_State | varchar | State in which prescription was filled (Exclude """"None"""" and blank values from any queries)521Region | varchar(9) | Region info of state522plan_type_description | varchar | Payor type (COMMERCIAL, MEDICARE, MEDICAID, etc.) in capital letters. (Exclude """"NONE"""" and blank values from any queries)523Plan_Name | varchar | Specific payor name524Drug_name | varchar | Brand or Drug name525Prescribed_Drug_Indication | varchar(2922) | Drug indication (based on prescribed drug)526Prescription_Fill_Year_Month | date | Date when prescription was filled527quantity | double | total quantity of drugs prescribed in each prescription528Total_Patient_Responsibility | double | Out of Pocket expense borne by patient529Total_Payer_Responsibility | double | Expense borne by payor530patient_age | integer | numeric age of patient in years531indication | string | Indications for given patient532Unknown_Flag | varchar(3) | If no disease detected, this would be Yes",In which state has Kyprolis presciption count grown the most over the last 3 months compared to the same time period last year?,"533 534WITH535numerator AS (536SELECT Patient_State, COUNT(distinct(claim_ID)) as total_claims537FROM ""symphony-data"".""test_performance_v3""538WHERE Drug_Name like '%KYPROLIS%'539AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)540from ""symphony-data"".""test_performance_v3"") - interval '3' month)541GROUP BY Patient_State542),543denominator AS(544SELECT Patient_State, COUNT(distinct(claim_ID)) as total_claims545FROM ""symphony-data"".""test_performance_v3""546WHERE Drug_Name like '%KYPROLIS%'547AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)548from ""symphony-data"".""test_performance_v3"") - interval '1' year - interval '3' month)549AND Prescription_Fill_Year_Month <= date((select max(Prescription_Fill_Year_Month)550from ""symphony-data"".""test_performance_v3"") - interval '1' year)551GROUP BY Patient_State552)553SELECT numerator.Patient_State, (cast(numerator.total_claims as double) / (denominator.total_claims)-1)*100 as growth_percentage554FROM numerator, denominator555ORDER BY growth_percentage DESC556LIMIT 1;"557"Hi! I need your help in generating an MySQL/ansi sql query.You are sql query generator all you should return is only query I am going to give you the schema associated with a database.558Name of the table is """"test_performance_v3"""".559Schema560Field Name | Field Type | Data Definition561NPI | varchar | 10 digit HCP identifier (Exclude blank and invalid NPIs from any queries)562Claim_ID | varchar | Unique claim identifier563Patient_ID | varchar | Unique patient identifier564Patient_Gender | varchar(8) | Patient Gender (Exclude """"Unknown"""" and blank values from any queries)565Patient_State | varchar | State in which prescription was filled (Exclude """"None"""" and blank values from any queries)566Region | varchar(9) | Region info of state567plan_type_description | varchar | Payor type (COMMERCIAL, MEDICARE, MEDICAID, etc.) in capital letters. (Exclude """"NONE"""" and blank values from any queries)568Plan_Name | varchar | Specific payor name569Drug_name | varchar | Brand or Drug name570Prescribed_Drug_Indication | varchar(2922) | Drug indication (based on prescribed drug)571Prescription_Fill_Year_Month | date | Date when prescription was filled572quantity | double | total quantity of drugs prescribed in each prescription573Total_Patient_Responsibility | double | Out of Pocket expense borne by patient574Total_Payer_Responsibility | double | Expense borne by payor575patient_age | integer | numeric age of patient in years576indication | string | Indications for given patient577Unknown_Flag | varchar(3) | If no disease detected, this would be Yes","For patients over 60 prescribed drugs for MM indication, what percentage of those prescriptions were for Kyprolis? ","578 579WITH580total_prescriptions AS (581SELECT COUNT(distinct(claim_ID)) AS total_prescriptions582FROM ""symphony-data"".""test_performance_v3""583WHERE indication like '%MM%'584AND patient_age >= 60585),586kyprolis_prescriptions AS (587SELECT COUNT(distinct(claim_ID)) AS kyprolis_prescriptions588FROM ""symphony-data"".""test_performance_v3""589WHERE indication like '%MM%'590AND patient_age >= 60591AND Drug_Name like '%KYPROLIS%'592)593SELECT ROUND(100.0 * kyprolis_prescriptions.kyprolis_prescriptions / total_prescriptions.total_prescriptions, 2) as kyprolis_percentage594FROM total_prescriptions, kyprolis_prescriptions;"595"Hi! I need your help in generating an MySQL/ansi sql query.You are sql query generator all you should return is only query I am going to give you the schema associated with a database.596Name of the table is """"test_performance_v3"""".597Schema598Field Name | Field Type | Data Definition599NPI | varchar | 10 digit HCP identifier (Exclude blank and invalid NPIs from any queries)600Claim_ID | varchar | Unique claim identifier601Patient_ID | varchar | Unique patient identifier602Patient_Gender | varchar(8) | Patient Gender (Exclude """"Unknown"""" and blank values from any queries)603Patient_State | varchar | State in which prescription was filled (Exclude """"None"""" and blank values from any queries)604Region | varchar(9) | Region info of state605plan_type_description | varchar | Payor type (COMMERCIAL, MEDICARE, MEDICAID, etc.) in capital letters. (Exclude """"NONE"""" and blank values from any queries)606Plan_Name | varchar | Specific payor name607Drug_name | varchar | Brand or Drug name608Prescribed_Drug_Indication | varchar(2922) | Drug indication (based on prescribed drug)609Prescription_Fill_Year_Month | date | Date when prescription was filled610quantity | double | total quantity of drugs prescribed in each prescription611Total_Patient_Responsibility | double | Out of Pocket expense borne by patient612Total_Payer_Responsibility | double | Expense borne by payor613patient_age | integer | numeric age of patient in years614indication | string | Indications for given patient615Unknown_Flag | varchar(3) | If no disease detected, this would be Yes",What is the market share of Kyprolis in MM indication for patients above 60 years?,"616 617WITH num AS (618SELECT COUNT(DISTINCT(Claim_ID)) AS num_data 619FROM ""symphony-data"".""test_performance_v3"" 620WHERE Drug_Name LIKE '%KYPROLIS%' 621AND indication LIKE '%MM%' 622AND patient_age >= 60 623AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month) 624from ""symphony-data"".""test_performance_v3"") - interval '90' day)625),626den AS (627SELECT COUNT(DISTINCT(Claim_ID)) AS den_data 628FROM ""symphony-data"".""test_performance_v3"" 629WHERE indication LIKE '%MM%' 630AND patient_age >= 60 631AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month) 632from ""symphony-data"".""test_performance_v3"") - interval '90' day)633)634SELECT ROUND(100.0 * num_data / den_data, 2) AS market_share 635FROM num, den;"636"Hi! I need your help in generating an MySQL/ansi sql query.You are sql query generator all you should return is only query I am going to give you the schema associated with a database.637Name of the table is """"test_performance_v3"""".638Schema639Field Name | Field Type | Data Definition640NPI | varchar | 10 digit HCP identifier (Exclude blank and invalid NPIs from any queries)641Claim_ID | varchar | Unique claim identifier642Patient_ID | varchar | Unique patient identifier643Patient_Gender | varchar(8) | Patient Gender (Exclude """"Unknown"""" and blank values from any queries)644Patient_State | varchar | State in which prescription was filled (Exclude """"None"""" and blank values from any queries)645Region | varchar(9) | Region info of state646plan_type_description | varchar | Payor type (COMMERCIAL, MEDICARE, MEDICAID, etc.) in capital letters. (Exclude """"NONE"""" and blank values from any queries)647Plan_Name | varchar | Specific payor name648Drug_name | varchar | Brand or Drug name649Prescribed_Drug_Indication | varchar(2922) | Drug indication (based on prescribed drug)650Prescription_Fill_Year_Month | date | Date when prescription was filled651quantity | double | total quantity of drugs prescribed in each prescription652Total_Patient_Responsibility | double | Out of Pocket expense borne by patient653Total_Payer_Responsibility | double | Expense borne by payor654patient_age | integer | numeric age of patient in years655indication | string | Indications for given patient656Unknown_Flag | varchar(3) | If no disease detected, this would be Yes",What is the market share of Kyprolis in MM indication for female/male patients over the last 6 months?,"657 658WITH num AS659(660SELECT COUNT(DISTINCT(Claim_ID)) AS num_data661FROM ""symphony-data"".""test_performance_v3""662WHERE Drug_Name LIKE '%KYPROLIS%'663AND indication LIKE '%MM%'664AND Patient_Gender IN ('Male', 'Female')665AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)666from ""symphony-data"".""test_performance_v3"") - interval '180' day)667),668den AS669(670SELECT COUNT(DISTINCT(Claim_ID)) AS den_data671FROM ""symphony-data"".""test_performance_v3""672WHERE indication LIKE '%MM%'673AND Patient_Gender IN ('Male', 'Female')674AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)675from ""symphony-data"".""test_performance_v3"") - interval '180' day)676)677SELECT ROUND(100.0 * num_data / den_data, 2) AS market_share678FROM num, den;"679"Hi! I need your help in generating an MySQL/ansi sql query.You are sql query generator all you should return is only query I am going to give you the schema associated with a database.680Name of the table is """"test_performance_v3"""".681Schema682Field Name | Field Type | Data Definition683NPI | varchar | 10 digit HCP identifier (Exclude blank and invalid NPIs from any queries)684Claim_ID | varchar | Unique claim identifier685Patient_ID | varchar | Unique patient identifier686Patient_Gender | varchar(8) | Patient Gender (Exclude """"Unknown"""" and blank values from any queries)687Patient_State | varchar | State in which prescription was filled (Exclude """"None"""" and blank values from any queries)688Region | varchar(9) | Region info of state689plan_type_description | varchar | Payor type (COMMERCIAL, MEDICARE, MEDICAID, etc.) in capital letters. (Exclude """"NONE"""" and blank values from any queries)690Plan_Name | varchar | Specific payor name691Drug_name | varchar | Brand or Drug name692Prescribed_Drug_Indication | varchar(2922) | Drug indication (based on prescribed drug)693Prescription_Fill_Year_Month | date | Date when prescription was filled694quantity | double | total quantity of drugs prescribed in each prescription695Total_Patient_Responsibility | double | Out of Pocket expense borne by patient696Total_Payer_Responsibility | double | Expense borne by payor697patient_age | integer | numeric age of patient in years698indication | string | Indications for given patient699Unknown_Flag | varchar(3) | If no disease detected, this would be Yes",Which drug had highest claims for patients above 60 in MM indication over the last 1 year?,"700 701SELECT Drug_Name, COUNT(distinct(claim_ID)) as num_prescriptions702FROM ""symphony-data"".""test_performance_v3""703WHERE indication like '%MM%'704AND patient_age > 60705AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)706from ""symphony-data"".""test_performance_v3"") - interval '1' year)707GROUP BY Drug_Name708ORDER BY num_prescriptions DESC709LIMIT 1;"710"Hi! I need your help in generating an MySQL/ansi sql query.You are sql query generator all you should return is only query I am going to give you the schema associated with a database.711Name of the table is """"test_performance_v3"""".712Schema713Field Name | Field Type | Data Definition714NPI | varchar | 10 digit HCP identifier (Exclude blank and invalid NPIs from any queries)715Claim_ID | varchar | Unique claim identifier716Patient_ID | varchar | Unique patient identifier717Patient_Gender | varchar(8) | Patient Gender (Exclude """"Unknown"""" and blank values from any queries)718Patient_State | varchar | State in which prescription was filled (Exclude """"None"""" and blank values from any queries)719Region | varchar(9) | Region info of state720plan_type_description | varchar | Payor type (COMMERCIAL, MEDICARE, MEDICAID, etc.) in capital letters. (Exclude """"NONE"""" and blank values from any queries)721Plan_Name | varchar | Specific payor name722Drug_name | varchar | Brand or Drug name723Prescribed_Drug_Indication | varchar(2922) | Drug indication (based on prescribed drug)724Prescription_Fill_Year_Month | date | Date when prescription was filled725quantity | double | total quantity of drugs prescribed in each prescription726Total_Patient_Responsibility | double | Out of Pocket expense borne by patient727Total_Payer_Responsibility | double | Expense borne by payor728patient_age | integer | numeric age of patient in years729indication | string | Indications for given patient730Unknown_Flag | varchar(3) | If no disease detected, this would be Yes",Which state in the US had the highest number of claims in the MM indication for patients over the age of 60 over the last 3 months? Exclude None and blank values in state column,"731 732SELECT Patient_State, COUNT(distinct(Claim_ID)) as num_claims733FROM ""symphony-data"".""test_performance_v3""734WHERE indication like '%MM%'735AND Patient_State NOT IN ('None', '')736AND patient_age > 60737AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)738from ""symphony-data"".""test_performance_v3"") - interval '90' day)739GROUP BY Patient_State740ORDER BY num_claims DESC741LIMIT 1;"742"Hi! I need your help in generating an MySQL/ansi sql query.You are sql query generator all you should return is only query I am going to give you the schema associated with a database.743Name of the table is """"test_performance_v3"""".744Schema745Field Name | Field Type | Data Definition746NPI | varchar | 10 digit HCP identifier (Exclude blank and invalid NPIs from any queries)747Claim_ID | varchar | Unique claim identifier748Patient_ID | varchar | Unique patient identifier749Patient_Gender | varchar(8) | Patient Gender (Exclude """"Unknown"""" and blank values from any queries)750Patient_State | varchar | State in which prescription was filled (Exclude """"None"""" and blank values from any queries)751Region | varchar(9) | Region info of state752plan_type_description | varchar | Payor type (COMMERCIAL, MEDICARE, MEDICAID, etc.) in capital letters. (Exclude """"NONE"""" and blank values from any queries)753Plan_Name | varchar | Specific payor name754Drug_name | varchar | Brand or Drug name755Prescribed_Drug_Indication | varchar(2922) | Drug indication (based on prescribed drug)756Prescription_Fill_Year_Month | date | Date when prescription was filled757quantity | double | total quantity of drugs prescribed in each prescription758Total_Patient_Responsibility | double | Out of Pocket expense borne by patient759Total_Payer_Responsibility | double | Expense borne by payor760patient_age | integer | numeric age of patient in years761indication | string | Indications for given patient762Unknown_Flag | varchar(3) | If no disease detected, this would be Yes",What is the most common payer type for Kyprolis in last 3 months?,"763 764SELECT plan_type_description, COUNT(distinct(claim_ID)) as num_prescriptions765FROM ""symphony-data"".""test_performance_v3""766WHERE Drug_Name like '%KYPROLIS%'767AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)768from ""symphony-data"".""test_performance_v3"") - interval '90' day)769AND plan_type_description NOT IN ('NONE', '')770GROUP BY plan_type_description771ORDER BY num_prescriptions DESC772LIMIT 1;"773"Hi! I need your help in generating an MySQL/ansi sql query.You are sql query generator all you should return is only query I am going to give you the schema associated with a database.774Name of the table is """"test_performance_v3"""".775Schema776Field Name | Field Type | Data Definition777NPI | varchar | 10 digit HCP identifier (Exclude blank and invalid NPIs from any queries)778Claim_ID | varchar | Unique claim identifier779Patient_ID | varchar | Unique patient identifier780Patient_Gender | varchar(8) | Patient Gender (Exclude """"Unknown"""" and blank values from any queries)781Patient_State | varchar | State in which prescription was filled (Exclude """"None"""" and blank values from any queries)782Region | varchar(9) | Region info of state783plan_type_description | varchar | Payor type (COMMERCIAL, MEDICARE, MEDICAID, etc.) in capital letters. (Exclude """"NONE"""" and blank values from any queries)784Plan_Name | varchar | Specific payor name785Drug_name | varchar | Brand or Drug name786Prescribed_Drug_Indication | varchar(2922) | Drug indication (based on prescribed drug)787Prescription_Fill_Year_Month | date | Date when prescription was filled788quantity | double | total quantity of drugs prescribed in each prescription789Total_Patient_Responsibility | double | Out of Pocket expense borne by patient790Total_Payer_Responsibility | double | Expense borne by payor791patient_age | integer | numeric age of patient in years792indication | string | Indications for given patient793Unknown_Flag | varchar(3) | If no disease detected, this would be Yes",What is the avg. out of pocket pay for Kyprolis in NY state in last 3 months?,"794 795SELECT AVG(Total_Patient_Responsibility) as avg_patient_pay796FROM ""symphony-data"".""test_performance_v3""797WHERE Drug_Name like '%KYPROLIS%'798AND Patient_State = 'NY'799AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)800from ""symphony-data"".""test_performance_v3"") - interval '90' day);"801"Hi! I need your help in generating an MySQL/ansi sql query.You are sql query generator all you should return is only query I am going to give you the schema associated with a database.802Name of the table is """"test_performance_v3"""".803Schema804Field Name | Field Type | Data Definition805NPI | varchar | 10 digit HCP identifier (Exclude blank and invalid NPIs from any queries)806Claim_ID | varchar | Unique claim identifier807Patient_ID | varchar | Unique patient identifier808Patient_Gender | varchar(8) | Patient Gender (Exclude """"Unknown"""" and blank values from any queries)809Patient_State | varchar | State in which prescription was filled (Exclude """"None"""" and blank values from any queries)810Region | varchar(9) | Region info of state811plan_type_description | varchar | Payor type (COMMERCIAL, MEDICARE, MEDICAID, etc.) in capital letters. (Exclude """"NONE"""" and blank values from any queries)812Plan_Name | varchar | Specific payor name813Drug_name | varchar | Brand or Drug name814Prescribed_Drug_Indication | varchar(2922) | Drug indication (based on prescribed drug)815Prescription_Fill_Year_Month | date | Date when prescription was filled816quantity | double | total quantity of drugs prescribed in each prescription817Total_Patient_Responsibility | double | Out of Pocket expense borne by patient818Total_Payer_Responsibility | double | Expense borne by payor819patient_age | integer | numeric age of patient in years820indication | string | Indications for given patient821Unknown_Flag | varchar(3) | If no disease detected, this would be Yes",Could you provide a ranking of all the brands in the MM indication based on their share of commercial payers over the last 3 months?,"822 823WITH824commercial_payers AS (825SELECT Drug_Name, COUNT(distinct(claim_ID)) as num_prescriptions826FROM ""symphony-data"".""test_performance_v3""827WHERE plan_type_description = 'COMMERCIAL'828AND indication like '%MM%'829AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)830from ""symphony-data"".""test_performance_v3"") - interval '90' day)831GROUP BY Drug_Name832),833total_payers AS (834SELECT COUNT(distinct(claim_ID)) as total_prescriptions835FROM ""symphony-data"".""test_performance_v3""836WHERE indication like '%MM%'837AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)838from ""symphony-data"".""test_performance_v3"") - interval '90' day)839)840SELECT Drug_Name, ROUND(100.0 * num_prescriptions / total_prescriptions, 2) as share_of_commercial_payers841FROM commercial_payers, total_payers842ORDER BY share_of_commercial_payers DESC;"843"Hi! I need your help in generating an MySQL/ansi sql query.You are sql query generator all you should return is only query I am going to give you the schema associated with a database.844Name of the table is """"test_performance_v3"""".845Schema846Field Name | Field Type | Data Definition847NPI | varchar | 10 digit HCP identifier (Exclude blank and invalid NPIs from any queries)848Claim_ID | varchar | Unique claim identifier849Patient_ID | varchar | Unique patient identifier850Patient_Gender | varchar(8) | Patient Gender (Exclude """"Unknown"""" and blank values from any queries)851Patient_State | varchar | State in which prescription was filled (Exclude """"None"""" and blank values from any queries)852Region | varchar(9) | Region info of state853plan_type_description | varchar | Payor type (COMMERCIAL, MEDICARE, MEDICAID, etc.) in capital letters. (Exclude """"NONE"""" and blank values from any queries)854Plan_Name | varchar | Specific payor name855Drug_name | varchar | Brand or Drug name856Prescribed_Drug_Indication | varchar(2922) | Drug indication (based on prescribed drug)857Prescription_Fill_Year_Month | date | Date when prescription was filled858quantity | double | total quantity of drugs prescribed in each prescription859Total_Patient_Responsibility | double | Out of Pocket expense borne by patient860Total_Payer_Responsibility | double | Expense borne by payor861patient_age | integer | numeric age of patient in years862indication | string | Indications for given patient863Unknown_Flag | varchar(3) | If no disease detected, this would be Yes","Based on the average out-of-pocket expenses for patients over 60 years old in the MM indication over the last 6 months, could you please give me the 5 drugs with lowest out-of-pocket expenses?","864 865WITH avg_patient_pay AS (866SELECT Drug_Name, AVG(Total_Patient_Responsibility) as avg_patient_pay867FROM ""symphony-data"".""test_performance_v3""868WHERE indication like '%MM%'869AND patient_age >= 60870AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)871from ""symphony-data"".""test_performance_v3"") - interval '6' month)872GROUP BY Drug_Name873)874SELECT Drug_Name, avg_patient_pay875FROM avg_patient_pay876ORDER BY avg_patient_pay ASC877LIMIT 5;"878"Hi! I need your help in generating an MySQL/ansi sql query.You are sql query generator all you should return is only query I am going to give you the schema associated with a database.879Name of the table is """"test_performance_v3"""".880Schema881Field Name | Field Type | Data Definition882NPI | varchar | 10 digit HCP identifier (Exclude blank and invalid NPIs from any queries)883Claim_ID | varchar | Unique claim identifier884Patient_ID | varchar | Unique patient identifier885Patient_Gender | varchar(8) | Patient Gender (Exclude """"Unknown"""" and blank values from any queries)886Patient_State | varchar | State in which prescription was filled (Exclude """"None"""" and blank values from any queries)887Region | varchar(9) | Region info of state888plan_type_description | varchar | Payor type (COMMERCIAL, MEDICARE, MEDICAID, etc.) in capital letters. (Exclude """"NONE"""" and blank values from any queries)889Plan_Name | varchar | Specific payor name890Drug_name | varchar | Brand or Drug name891Prescribed_Drug_Indication | varchar(2922) | Drug indication (based on prescribed drug)892Prescription_Fill_Year_Month | date | Date when prescription was filled893quantity | double | total quantity of drugs prescribed in each prescription894Total_Patient_Responsibility | double | Out of Pocket expense borne by patient895Total_Payer_Responsibility | double | Expense borne by payor896patient_age | integer | numeric age of patient in years897indication | string | Indications for given patient898Unknown_Flag | varchar(3) | If no disease detected, this would be Yes",What is Kyprolis's claims volume in the last 3 months for patient above 60 and male?,"SELECT COUNT(distinct(claim_ID)) as num_claims 899FROM ""symphony-data"".""test_performance_v3"" 900WHERE Drug_Name like '%KYPROLIS%' 901AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month) 902from ""symphony-data"".""test_performance_v3"") - interval '90' day) 903AND patient_age > 60 904AND Patient_Gender = 'Male';905"906"Hi! I need your help in generating an MySQL/ansi sql query.You are sql query generator all you should return is only query I am going to give you the schema associated with a database.907Name of the table is """"test_performance_v3"""".908Schema909Field Name | Field Type | Data Definition910NPI | varchar | 10 digit HCP identifier (Exclude blank and invalid NPIs from any queries)911Claim_ID | varchar | Unique claim identifier912Patient_ID | varchar | Unique patient identifier913Patient_Gender | varchar(8) | Patient Gender (Exclude """"Unknown"""" and blank values from any queries)914Patient_State | varchar | State in which prescription was filled (Exclude """"None"""" and blank values from any queries)915Region | varchar(9) | Region info of state916plan_type_description | varchar | Payor type (COMMERCIAL, MEDICARE, MEDICAID, etc.) in capital letters. (Exclude """"NONE"""" and blank values from any queries)917Plan_Name | varchar | Specific payor name918Drug_name | varchar | Brand or Drug name919Prescribed_Drug_Indication | varchar(2922) | Drug indication (based on prescribed drug)920Prescription_Fill_Year_Month | date | Date when prescription was filled921quantity | double | total quantity of drugs prescribed in each prescription922Total_Patient_Responsibility | double | Out of Pocket expense borne by patient923Total_Payer_Responsibility | double | Expense borne by payor924patient_age | integer | numeric age of patient in years925indication | string | Indications for given patient926Unknown_Flag | varchar(3) | If no disease detected, this would be Yes",What is the most common payer type for Kyprolis in last 3 months for the indication mm?,"SELECT plan_type_description, COUNT(distinct(claim_ID)) as num_prescriptions927FROM ""symphony-data"".""test_performance_v3""928WHERE Drug_Name like '%KYPROLIS%'929AND indication like '%MM%'930AND plan_type_description not like 'NONE'931AND plan_type_description not like ''932AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)933from ""symphony-data"".""test_performance_v3"") - interval '90' day)934GROUP BY plan_type_description935ORDER BY num_prescriptions DESC936LIMIT 1;"937"Hi! I need your help in generating an MySQL/ansi sql query.You are sql query generator all you should return is only query I am going to give you the schema associated with a database.938Name of the table is """"test_performance_v3"""".939Schema940Field Name | Field Type | Data Definition941NPI | varchar | 10 digit HCP identifier (Exclude blank and invalid NPIs from any queries)942Claim_ID | varchar | Unique claim identifier943Patient_ID | varchar | Unique patient identifier944Patient_Gender | varchar(8) | Patient Gender (Exclude """"Unknown"""" and blank values from any queries)945Patient_State | varchar | State in which prescription was filled (Exclude """"None"""" and blank values from any queries)946Region | varchar(9) | Region info of state947plan_type_description | varchar | Payor type (COMMERCIAL, MEDICARE, MEDICAID, etc.) in capital letters. (Exclude """"NONE"""" and blank values from any queries)948Plan_Name | varchar | Specific payor name949Drug_name | varchar | Brand or Drug name950Prescribed_Drug_Indication | varchar(2922) | Drug indication (based on prescribed drug)951Prescription_Fill_Year_Month | date | Date when prescription was filled952quantity | double | total quantity of drugs prescribed in each prescription953Total_Patient_Responsibility | double | Out of Pocket expense borne by patient954Total_Payer_Responsibility | double | Expense borne by payor955patient_age | integer | numeric age of patient in years956indication | string | Indications for given patient957Unknown_Flag | varchar(3) | If no disease detected, this would be Yes",What is the market share of Kyprolis in MM indication for female/male patients over the last 6 months for the plan type Commercial? ,"958 959WITH num AS (960SELECT COUNT(DISTINCT(Claim_ID)) AS num_data961FROM ""symphony-data"".""test_performance_v3""962WHERE Drug_Name like '%KYPROLIS%'963AND Patient_Gender IN ('Female', 'Male')964AND plan_type_description = 'COMMERCIAL'965AND indication like '%MM%'966AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)967from ""symphony-data"".""test_performance_v3"") - interval '180' day)968),969den AS (970SELECT COUNT(DISTINCT(Claim_ID)) AS den_data971FROM ""symphony-data"".""test_performance_v3""972WHERE indication IN (SELECT DISTINCT(indication) FROM ""symphony-data"".""test_performance_v3""973WHERE indication NOT LIKE 'No Indication'974AND indication NOT LIKE 'Unknown_Flag'975AND indication LIKE '%MM%')976AND Patient_Gender IN ('Female', 'Male')977AND plan_type_description = 'COMMERCIAL'978AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)979from ""symphony-data"".""test_performance_v3"") - interval '180' day)980)981SELECT ROUND(100.0 * num_data / den_data, 2) AS market_share982FROM num, den;"983"Hi! I need your help in generating an MySQL/ansi sql query.You are sql query generator all you should return is only query I am going to give you the schema associated with a database.984Name of the table is """"test_performance_v3"""".985Schema986Field Name | Field Type | Data Definition987NPI | varchar | 10 digit HCP identifier (Exclude blank and invalid NPIs from any queries)988Claim_ID | varchar | Unique claim identifier989Patient_ID | varchar | Unique patient identifier990Patient_Gender | varchar(8) | Patient Gender (Exclude """"Unknown"""" and blank values from any queries)991Patient_State | varchar | State in which prescription was filled (Exclude """"None"""" and blank values from any queries)992Region | varchar(9) | Region info of state993plan_type_description | varchar | Payor type (COMMERCIAL, MEDICARE, MEDICAID, etc.) in capital letters. (Exclude """"NONE"""" and blank values from any queries)994Plan_Name | varchar | Specific payor name995Drug_name | varchar | Brand or Drug name996Prescribed_Drug_Indication | varchar(2922) | Drug indication (based on prescribed drug)997Prescription_Fill_Year_Month | date | Date when prescription was filled998quantity | double | total quantity of drugs prescribed in each prescription999Total_Patient_Responsibility | double | Out of Pocket expense borne by patient1000Total_Payer_Responsibility | double | Expense borne by payor1001patient_age | integer | numeric age of patient in years1002indication | string | Indications for given patient1003Unknown_Flag | varchar(3) | If no disease detected, this would be Yes",What is the most common payer type for Kyprolis in last 3 months in ny state?,"1004 1005WITH kyprolis_prescriptions AS (1006SELECT plan_type_description, COUNT(distinct(claim_ID)) AS num_prescriptions1007FROM ""symphony-data"".""test_performance_v3""1008WHERE Drug_Name like '%KYPROLIS%'1009AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)1010from ""symphony-data"".""test_performance_v3"") - interval '90' day)1011AND Patient_State = 'NY'1012GROUP BY plan_type_description1013)1014SELECT plan_type_description, num_prescriptions1015FROM kyprolis_prescriptions1016ORDER BY num_prescriptions DESC1017LIMIT 1;"1018"Hi! I need your help in generating an MySQL/ansi sql query.You are sql query generator all you should return is only query I am going to give you the schema associated with a database.1019Name of the table is """"test_performance_v3"""".1020Schema1021Field Name | Field Type | Data Definition1022NPI | varchar | 10 digit HCP identifier (Exclude blank and invalid NPIs from any queries)1023Claim_ID | varchar | Unique claim identifier1024Patient_ID | varchar | Unique patient identifier1025Patient_Gender | varchar(8) | Patient Gender (Exclude """"Unknown"""" and blank values from any queries)1026Patient_State | varchar | State in which prescription was filled (Exclude """"None"""" and blank values from any queries)1027Region | varchar(9) | Region info of state1028plan_type_description | varchar | Payor type (COMMERCIAL, MEDICARE, MEDICAID, etc.) in capital letters. (Exclude """"NONE"""" and blank values from any queries)1029Plan_Name | varchar | Specific payor name1030Drug_name | varchar | Brand or Drug name1031Prescribed_Drug_Indication | varchar(2922) | Drug indication (based on prescribed drug)1032Prescription_Fill_Year_Month | date | Date when prescription was filled1033quantity | double | total quantity of drugs prescribed in each prescription1034Total_Patient_Responsibility | double | Out of Pocket expense borne by patient1035Total_Payer_Responsibility | double | Expense borne by payor1036patient_age | integer | numeric age of patient in years1037indication | string | Indications for given patient1038Unknown_Flag | varchar(3) | If no disease detected, this would be Yes",How did Kyprolis prescriptions for MM indication for the patient less than 45 years grow for 2021 vs 2020?,"1039 1040WITH1041kyprolis_prescriptions_2021 AS (1042SELECT COUNT(distinct(claim_ID)) AS num_prescriptions1043FROM ""symphony-data"".""test_performance_v3""1044WHERE Drug_Name like '%KYPROLIS%'1045AND indication like '%MM%'1046AND patient_age < 451047AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)1048from ""symphony-data"".""test_performance_v3"") - interval '1' year)1049AND Prescription_Fill_Year_Month <= date((select max(Prescription_Fill_Year_Month)1050from ""symphony-data"".""test_performance_v3""))1051),1052kyprolis_prescriptions_2020 AS (1053SELECT COUNT(distinct(claim_ID)) AS num_prescriptions1054FROM ""symphony-data"".""test_performance_v3""1055WHERE Drug_Name like '%KYPROLIS%'1056AND indication like '%MM%'1057AND patient_age < 451058AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)1059from ""symphony-data"".""test_performance_v3"") - interval '2' year)1060AND Prescription_Fill_Year_Month <= date((select max(Prescription_Fill_Year_Month)1061from ""symphony-data"".""test_performance_v3"") - interval '1' year)1062)1063SELECT (cast(kyprolis_prescriptions_2021.num_prescriptions as double) / (kyprolis_prescriptions_2020.num_prescriptions)-1)*100 as growth from kyprolis_prescriptions_2021, kyprolis_prescriptions_2020;"1064"Hi! I need your help in generating an MySQL/ansi sql query.You are sql query generator all you should return is only query I am going to give you the schema associated with a database.1065Name of the table is """"test_performance_v3"""".1066Schema1067Field Name | Field Type | Data Definition1068NPI | varchar | 10 digit HCP identifier (Exclude blank and invalid NPIs from any queries)1069Claim_ID | varchar | Unique claim identifier1070Patient_ID | varchar | Unique patient identifier1071Patient_Gender | varchar(8) | Patient Gender (Exclude """"Unknown"""" and blank values from any queries)1072Patient_State | varchar | State in which prescription was filled (Exclude """"None"""" and blank values from any queries)1073Region | varchar(9) | Region info of state1074plan_type_description | varchar | Payor type (COMMERCIAL, MEDICARE, MEDICAID, etc.) in capital letters. (Exclude """"NONE"""" and blank values from any queries)1075Plan_Name | varchar | Specific payor name1076Drug_name | varchar | Brand or Drug name1077Prescribed_Drug_Indication | varchar(2922) | Drug indication (based on prescribed drug)1078Prescription_Fill_Year_Month | date | Date when prescription was filled1079quantity | double | total quantity of drugs prescribed in each prescription1080Total_Patient_Responsibility | double | Out of Pocket expense borne by patient1081Total_Payer_Responsibility | double | Expense borne by payor1082patient_age | integer | numeric age of patient in years1083indication | string | Indications for given patient1084Unknown_Flag | varchar(3) | If no disease detected, this would be Yes",What is the market share of Kyprolis in MM indication for female patients above 45 years?,"1085 1086WITH num AS (1087SELECT COUNT(DISTINCT(Claim_ID)) AS num_data 1088FROM ""symphony-data"".""test_performance_v3"" 1089WHERE Drug_Name like '%KYPROLIS%' 1090AND indication like '%MM%' 1091AND Patient_Gender = 'Female' 1092AND patient_age > 45 1093AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)1094from ""symphony-data"".""test_performance_v3"") - interval '90' day)1095),1096den AS (1097SELECT COUNT(DISTINCT(Claim_ID)) AS den_data 1098FROM ""symphony-data"".""test_performance_v3"" 1099WHERE indication like '%MM%' 1100AND Patient_Gender = 'Female' 1101AND patient_age > 45 1102AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)1103from ""symphony-data"".""test_performance_v3"") - interval '90' day)1104)1105SELECT ROUND(100.0 * num_data / den_data, 2) AS market_share 1106FROM num, den;"1107"Hi! I need your help in generating an MySQL/ansi sql query.You are sql query generator all you should return is only query I am going to give you the schema associated with a database.1108Name of the table is """"test_performance_v3"""".1109Schema1110Field Name | Field Type | Data Definition1111NPI | varchar | 10 digit HCP identifier (Exclude blank and invalid NPIs from any queries)1112Claim_ID | varchar | Unique claim identifier1113Patient_ID | varchar | Unique patient identifier1114Patient_Gender | varchar(8) | Patient Gender (Exclude """"Unknown"""" and blank values from any queries)1115Patient_State | varchar | State in which prescription was filled (Exclude """"None"""" and blank values from any queries)1116Region | varchar(9) | Region info of state1117plan_type_description | varchar | Payor type (COMMERCIAL, MEDICARE, MEDICAID, etc.) in capital letters. (Exclude """"NONE"""" and blank values from any queries)1118Plan_Name | varchar | Specific payor name1119Drug_name | varchar | Brand or Drug name1120Prescribed_Drug_Indication | varchar(2922) | Drug indication (based on prescribed drug)1121Prescription_Fill_Year_Month | date | Date when prescription was filled1122quantity | double | total quantity of drugs prescribed in each prescription1123Total_Patient_Responsibility | double | Out of Pocket expense borne by patient1124Total_Payer_Responsibility | double | Expense borne by payor1125patient_age | integer | numeric age of patient in years1126indication | string | Indications for given patient1127Unknown_Flag | varchar(3) | If no disease detected, this would be Yes",What is the claims volume of Kyprolis in the MM indication in the past 6 months?,"1128 1129SELECT COUNT(distinct(claim_ID)) AS num_prescriptions1130FROM ""symphony-data"".""test_performance_v3""1131WHERE Drug_Name like '%KYPROLIS%'1132AND indication like '%MM%'1133AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)1134from ""symphony-data"".""test_performance_v3"") - interval '6' month);"1135"Hi! I need your help in generating an MySQL/ansi sql query.You are sql query generator all you should return is only query I am going to give you the schema associated with a database.1136Name of the table is """"test_performance_v3"""".1137Schema1138Field Name | Field Type | Data Definition1139NPI | varchar | 10 digit HCP identifier (Exclude blank and invalid NPIs from any queries)1140Claim_ID | varchar | Unique claim identifier1141Patient_ID | varchar | Unique patient identifier1142Patient_Gender | varchar(8) | Patient Gender (Exclude """"Unknown"""" and blank values from any queries)1143Patient_State | varchar | State in which prescription was filled (Exclude """"None"""" and blank values from any queries)1144Region | varchar(9) | Region info of state1145plan_type_description | varchar | Payor type (COMMERCIAL, MEDICARE, MEDICAID, etc.) in capital letters. (Exclude """"NONE"""" and blank values from any queries)1146Plan_Name | varchar | Specific payor name1147Drug_name | varchar | Brand or Drug name1148Prescribed_Drug_Indication | varchar(2922) | Drug indication (based on prescribed drug)1149Prescription_Fill_Year_Month | date | Date when prescription was filled1150quantity | double | total quantity of drugs prescribed in each prescription1151Total_Patient_Responsibility | double | Out of Pocket expense borne by patient1152Total_Payer_Responsibility | double | Expense borne by payor1153patient_age | integer | numeric age of patient in years1154indication | string | Indications for given patient1155Unknown_Flag | varchar(3) | If no disease detected, this would be Yes",What is the claims volume of Kyprolis in the cml indication in the past 6 months specifically for (cml)?,"1156 1157SELECT COUNT(distinct(claim_ID)) AS num_prescriptions1158FROM ""symphony-data"".""test_performance_v3""1159WHERE Drug_Name like '%KYPROLIS%'1160AND indication like '%CML%'1161AND indication like '%Multiple Myeloma%'1162AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)1163from ""symphony-data"".""test_performance_v3"") - interval '6' month);"1164"Hi! I need your help in generating an MySQL/ansi sql query.You are sql query generator all you should return is only query I am going to give you the schema associated with a database.1165Name of the table is """"test_performance_v3"""".1166Schema1167Field Name | Field Type | Data Definition1168NPI | varchar | 10 digit HCP identifier (Exclude blank and invalid NPIs from any queries)1169Claim_ID | varchar | Unique claim identifier1170Patient_ID | varchar | Unique patient identifier1171Patient_Gender | varchar(8) | Patient Gender (Exclude """"Unknown"""" and blank values from any queries)1172Patient_State | varchar | State in which prescription was filled (Exclude """"None"""" and blank values from any queries)1173Region | varchar(9) | Region info of state1174plan_type_description | varchar | Payor type (COMMERCIAL, MEDICARE, MEDICAID, etc.) in capital letters. (Exclude """"NONE"""" and blank values from any queries)1175Plan_Name | varchar | Specific payor name1176Drug_name | varchar | Brand or Drug name1177Prescribed_Drug_Indication | varchar(2922) | Drug indication (based on prescribed drug)1178Prescription_Fill_Year_Month | date | Date when prescription was filled1179quantity | double | total quantity of drugs prescribed in each prescription1180Total_Patient_Responsibility | double | Out of Pocket expense borne by patient1181Total_Payer_Responsibility | double | Expense borne by payor1182patient_age | integer | numeric age of patient in years1183indication | string | Indications for given patient1184Unknown_Flag | varchar(3) | If no disease detected, this would be Yes",Which brand had the highest claims volume in the cml indication in the past 6 months?,"1185 1186SELECT Drug_Name, COUNT(distinct(claim_ID)) as num_prescriptions1187FROM ""symphony-data"".""test_performance_v3""1188WHERE indication like '%CML%'1189AND Prescription_Fill_Year_Month >= date((select max(Prescription_Fill_Year_Month)1190from ""symphony-data"".""test_performance_v3"") - interval '6' month)1191GROUP BY Drug_Name1192ORDER BY num_prescriptions DESC1193LIMIT 1;"1194"Hi! I need your help in generating an MySQL/ansi sql query.You are sql query generator all you should return is only query I am going to give you the schema associated with a database.1195Name of the table is """"test_performance_v3"""".1196Schema1197Field Name | Field Type | Data Definition1198NPI | varchar | 10 digit HCP identifier (Exclude blank and invalid NPIs from any queries)1199Claim_ID | varchar | Unique claim identifier1200Patient_ID | varchar | Unique patient identifier

Showing the first 1,200 of 2278 lines. Download the file for the rest.