0% found this document useful (0 votes)
51 views1 page

SQL Max

This SQL query selects the second highest quantity value from the Trade table. It finds the maximum quantity, excludes it, and then selects the next highest value.

Uploaded by

bksreejith4781
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views1 page

SQL Max

This SQL query selects the second highest quantity value from the Trade table. It finds the maximum quantity, excludes it, and then selects the next highest value.

Uploaded by

bksreejith4781
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

SELECT quantity FROM Trade WHERE quantity=(SELECT MAX(quantity) FROM Trade WHERE quantity<> (SELECT MAX(quantity) FROM Trade))

You might also like