w3resource
SQL exercises

SQL Exercises: Find the maximum purchase amount of all the orders

SQL Aggregate Functions: Exercise-6 with Solution

Write a SQL statement to know the maximum purchase amount of all the orders.

Sample table: orders


Sample Solution:

SELECT MAX (purch_amt) 
FROM orders;

Output of the Query:

max
5760.00

Explanation:

Syntax of find the maximum purchase amount of all the orders

Pictorial presentation:

Find the maximum purchase amount of all the orders

Query Visualization:

Duration:

Query visualization of Find the maximum purchase amount of all the orders - Duration

Rows:

Query visualization of Find the maximum purchase amount of all the orders - Rows

Cost:

Query visualization of Find the maximum purchase amount of all the orders - Cost

 

Practice Online


Have another way to solve this solution? Contribute your code (and comments) through Disqus.

Previous: Write a SQL statement find the number of customers who gets at least a gradation for his/her performance.
Next: Write a SQL statement to know the minimum purchase amount of all the orders.

What is the difficulty level of this exercise?



New Content: Composer: Dependency manager for PHP, R Programming