This query is used to to provide summary statistics for costs paid by coinsurance (paid_coinsurance) across all drug cost records: the mean, the standard deviation, the minimum, the 25th percentile, the median, the 75th percentile, the maximum and the number of missing values. No input is required for this query.
Input:
Sample query run:
The following is a sample run of the query. The input parameters are highlighted in blue-- Oracle
SELECT min(tt.stat_value) AS min_value
, max(tt.stat_value) AS max_value
, avg(tt.stat_value) AS avg_value
, (round(stdDev(tt.stat_value)) ) AS stdDev_value
, PERCENTILE_DISC(0.25) WITHIN GROUP (ORDER BY tt.stat_value )
AS percentile_25
, PERCENTILE_DISC(0.5) WITHIN GROUP (ORDER BY tt.stat_value )
AS median_value
, PERCENTILE_DISC(0.75) WITHIN GROUP (ORDER BY tt.stat_value )
AS percentile_75
FROM
( SELECT t.paid_coinsurance AS stat_value
FROM drug_cost t
where t.paid_coinsurance > 0
) tt
;
Output:
Output field list:
Field |
Description |
min_value |
The portion of the drug expenses due to the cost charged by the manufacturer for the drug, typically a percentage of the Average Wholesale Price. |
max_value |
|
avg_value |
|
stdDev_value |
|
Sample output record:
Field |
Value |
min_value |
|
max_value |
|
avg_value |
|
stdDev_value |
|
percentile_25 |
|
median_value |
|
percentile_75 |
|
|
|