Counts the patients' zip of their residence location across all person records. All possible values for zip are summarized. Zip code contains only the first 3 digits in most databases.
Input:
<None>
Sample query run:
The following is a sample run of the query.
SELECT state,
NVL( zip, '9999999' ) AS zip,
count(*) Num_Persons_count
FROM person
LEFT OUTER JOIN location USING( location_id )
GROUP BY state, NVL( zip, '9999999' )
ORDER BY 1, 2
Output:
Output field list:
Field |
Description |
State |
State of residence |
Zip |
3 digit zip code of residence |
Num_Persons_count |
Number of patients in the dataset residing in a specific zip code |
Sample output record:
Field |
Value |
State |
MA |
Zip |
019 |
Num_Persons_count |
477825 |
|
|