Final answer:
To list customer names and their purchase totals only when purchases exceed $5000 and order them from highest to lowest, use an SQL query with SUM, HAVING, and ORDER BY clauses.
Step-by-step explanation:
The SQL query to list the customer name and the dollar amount of total purchases, where purchases exceed $5000 and ordered from highest to lowest would typically involve using the SUM function to calculate total purchases, the HAVING clause to filter out customers with purchases less than $5000, and the ORDER BY clause to sort the results.
An example query might look like this:
SELECT customer_name AS Customer_Name, SUM(purchase_amount) AS Total_Purchases
FROM purchases
GROUP BY customer_name
HAVING SUM(purchase_amount) > 5000
ORDER BY SUM(purchase_amount) DESC;
This query will collect the sum of the purchase_amount for each customer, rename the columns to Customer_Name and Total_Purchases for clarity, filter only those sums that are greater than $5000, and then order the results in descending order by the Total_Purchases.