Advanced Queries

Nesting Queries


Write a query that returns the average number of individuals sampled on each plot type on a per plot basis. In other words, how many individuals are sampled on average on a plot of a given plot type? So, if 500 individuals are sampled on a plot type that has 5 plots, then the result should be 100 individuals.

To do this you will need to combine multiple queries. It will be easiest for first figure out which queries you will need, then write the first query and make sure it is work, and then add the second query.

Save this query as per_plot_individuals_per_plot_type.

[click here for output]