So I am taking a database class this semester, and we're working on our first assignment legitimately related to running queries. I've managed the first 9 queries pretty easily, but the last one has had me stumped for the last hour or two, despite consulting the text and the Internet in general. I'm hoping I can ask my question directly here and get some assistance.
Sorry, for some slightly awkward formatting result, but this is the table the question relates to:
BRANCH_NAME BRANCH_CITY ASSETS
--------------- --------------- ----------
Downtown Brooklyn 900000
Redwood Palo Alto 2100000
Perryridge Horseneck 1700000
Mianus Horseneck 400200
Round Hill Horseneck 8000000
Pownal Bennington 400000
North Town Rye 3700000
Brighton Brooklyn 7000000
Central Rye 400280
The question asks us for the BRANCH_NAME with the most and fewest ASSETS. I can run the MIN() and MAX() functions and get the numbers, and I can do a query based on the minimum and maximum numbers. However, the question requires us to pull the BRANCH_NAME while running the aggregate function(s), and I've not figured out a way to do so.
So, if anyone can give me a hand here, I'd be very appreciative for the assist.
Sorry, for some slightly awkward formatting result, but this is the table the question relates to:
BRANCH_NAME BRANCH_CITY ASSETS
--------------- --------------- ----------
Downtown Brooklyn 900000
Redwood Palo Alto 2100000
Perryridge Horseneck 1700000
Mianus Horseneck 400200
Round Hill Horseneck 8000000
Pownal Bennington 400000
North Town Rye 3700000
Brighton Brooklyn 7000000
Central Rye 400280
The question asks us for the BRANCH_NAME with the most and fewest ASSETS. I can run the MIN() and MAX() functions and get the numbers, and I can do a query based on the minimum and maximum numbers. However, the question requires us to pull the BRANCH_NAME while running the aggregate function(s), and I've not figured out a way to do so.
So, if anyone can give me a hand here, I'd be very appreciative for the assist.