Question: Help with SQL! Given a table with 1000s of entries as the following: Fruit State Desc Year Sales Apples TX Green 2010 20000 Apples CA
Help with SQL! Given a table with 1000s of entries as the following:
| Fruit | State | Desc | Year | Sales |
| Apples | TX | Green | 2010 | 20000 |
| Apples | CA | Green | 2010 | 1000 |
| Bananas | TX | NA | 2011 | 20050 |
.....
1. I need an SQL Query that would give me the that will give me the data in the following order:
Fruit, Revenue, state, and year -> from the year with the minimum Apple sales
2. A query with the sum of revenue for all fruits sold in California in the year 2010
Displayed as: state, sum of revenue, year
Explanations will be great! Thank you
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
