Skip to content

Latest commit

 

History

History
13 lines (12 loc) · 461 Bytes

Aggregation-sum-SQL.md

File metadata and controls

13 lines (12 loc) · 461 Bytes
layout topic title language
exercise
Aggregation
SUM
SQL

Write a query that returns the number of individuals of each species captured in each year (total_abundance) and the total_biomass of those individuals (the sum of the weight). The units for biomass should be in kilograms. Include the year and species_id in the output. Sort the result chronologically by year and then alphabetically by species. Save as mass_abundance_data.