/Analysis_on_pets_Data

Technical Challenge: To answer the Data Analysis questions using sql and R

Primary LanguageHTML

Analysis_on_pets_Data

Refer The test.sql

Which pet (enter pet's name) had the most procedures?

Which owner (enter OwnerID) spent the most on a procedure or procedures for his/her pet(s)?

What is the mean price per procedure for pets with owners who have a 49503 zip code

What percentage of dogs in pets.csv that have a "c" in their name are male? Keep answer in decimal format and round to the nearest hundredth (e.g. 0.75).

What is the standard deviation of age for dogs? Keep answer in decimal format and round to the nearest hundredth (e.g. 0.75)

How old is the oldest parrot?

What is the mean age of cats? Keep answer in decimal format and round to the nearest hundredth (e.g. 0.75).

Please upload an image of a box plot with kind of pet on the x-axis and pet age on the y-axis. The distributions of dog, cat and parrot ages should be shown in green, purple and orange, respectively. An example of a box plot can be found here: https://ggplot2.tidyverse.org/reference/geom_boxplot.html

Please upload the script and/or file(s) you used to complete this form.

BONUS: Please upload a script with a user-defined function that accepts OwnerID as an input and returns a vector of pet names for the given OwnerID.

Solution in Test.r and Test.sql