with the provided schema write sql queries that will create a table of data responsive to each of the following prompts

Using the simple database schema for healthcare encounters, write SQL queries that will create a table of data responsive to each of the following prompts. For each prompt, pay close attention to which fields are requested, which fields are necessary for filtering and sorting but do not need to appear in the final output, and which tables are necessary to provide the necessary fields.

  1. Recreate the list from the example prompt, but ensure that each patient is only listed once. That is, produce a list of distinct patients.
  2. List the names of patients for each procedure type (by billing code). The output should list the billing code first, followed by the patient name. Sort by billing code first, then patient name.
  3. List the distinct procedure labels for a provider with the specialty of “dermatologist”.
  4. Produce a count of procedure types for each provider specialty.
  5. List the names and addresses of all patients who have had an encounter with a provider licensed in California (CA).

“Order a similar paper and get 20% discount on your first order with us Use the following coupon “FIRST20”

 

Posted in Uncategorized