Species-Based Order Tiers
Tables Used
customers
Column
Type
customerid
bigint
name
text
species
text
contactinfo
text
loyaltystatus
text
joindate
text
orders
Column
Type
orderid
bigint
customerid
bigint
orderdate
timestamp without time zone
totalamount
double precision
status
text
Expected Output
Column
species
orderid
totalamount
spendingtier
38. Species-Based Order Tiers
Rank orders into 4 spending groups within each species.
Xorthax wants to categorize all orders into 4 spending tiers for each species. Write a query to rank orders by total amount within each species.
Write Your Query
Run Query
Show Hint
Show Answer
Answer:
Explanation:
This site uses essential cookies to remember your session and progress.
Learn more
.
Got it